]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
avoid leaking a buffer element when _gnutls_stream_read returns 0
authorMatt Whitlock <matt@whitlock.name>
Tue, 16 Jul 2013 11:24:10 +0000 (07:24 -0400)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 19 Jul 2013 15:08:43 +0000 (17:08 +0200)
lib/gnutls_buffers.c

index 9e4735ebc96e03aa8d19905b82819d411dd610b8..3b281f7bad043c0df6648e09cea061acb940b126 100644 (file)
@@ -355,6 +355,9 @@ finish:
   _gnutls_read_log ("READ: read %d bytes from %p\n",
                         (int) (size - left), fd);
 
+  if (size - left == 0)
+    _mbuffer_xfree(bufel);
+
   return (size - left);
   
 cleanup: