Browse Source

Avoid double free when iob_addbuf_free fails, thanks to Sami Farin

undefined
Dirk Engling 3 years ago
parent
commit
0ebc0ed6a3
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      proxy.c

+ 1
- 2
proxy.c View File

@@ -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 );
}
}


Loading…
Cancel
Save