Permalink
Browse files

fix memory leak in new outbuf implementation

  • Loading branch information...
1 parent 646aa35 commit 7752b6af9ebf3e1c1be169b704c085a81c8de5b8 @rfk committed Apr 3, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 tnetstring/tns_outbuf_back.c
@@ -82,6 +82,7 @@ static inline int tns_outbuf_extend(tns_outbuf *outbuf, size_t free_size)
new_head = new_buf + new_size - used_size;
memmove(new_head, outbuf->head, used_size);
+ free(outbuf->buffer);
outbuf->buffer = new_buf;
outbuf->head = new_head;
outbuf->alloc_size = new_size;

0 comments on commit 7752b6a

Please sign in to comment.