Permalink
Browse files

fix leak when resizing buffer with readable data inside

  • Loading branch information...
1 parent 4cf2719 commit a91a18ea97025d5bd616afb10b033bf8586cff25 @xaqq committed Apr 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/ring_buffer/ring_buffer.c
@@ -5,7 +5,7 @@
** Login <kapp_a@epitech.net>
**
** Started on Wed Feb 22 21:48:40 2012 arnaud kapp
-** Last update Thu Apr 5 13:00:52 2012 arnaud kapp
+** Last update Thu Apr 5 15:05:39 2012 arnaud kapp
*/
#include <stdlib.h>
@@ -35,6 +35,7 @@ static int resize(RingBuffer *b)
b->e = r;
b->data = ptr;
b->size += RGBUF_SIZE;
+ free(tmp);
return (1);
}

0 comments on commit a91a18e

Please sign in to comment.