From 0ebc0ed6a3e3b7acc9f9e338cc23cea5f4f22f61 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 2 Oct 2016 18:47:16 +0200 Subject: Avoid double free when iob_addbuf_free fails, thanks to Sami Farin --- proxy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy.c b/proxy.c index 82789cb..1f09777 100644 --- a/proxy.c +++ b/proxy.c @@ -715,8 +715,7 @@ unlock_continue: void *tmp = malloc( mem ); if( tmp ) { memcpy( tmp, ptr, mem ); - if( !iob_addbuf_free( &g_connections[i].outdata, tmp, mem ) ) - free( tmp ); + iob_addbuf_free( &g_connections[i].outdata, tmp, mem ); io_wantwrite( g_connections[i].fd ); } } -- cgit v1.2.3