Browse Source

Bugfix: bytes_free: Set buf to NULL so the bytes_t is reusable

Luke Dashjr 11 years ago
parent
commit
5b9ab72821
1 changed files with 1 additions and 1 deletions
  1. 1 1
      util.h

+ 1 - 1
util.h

@@ -330,7 +330,7 @@ static inline
 void bytes_free(bytes_t *b)
 {
 	free(b->buf);
-	b->sz = b->allocsz = 0;
+	bytes_init(b);
 }