mirror of
git://erdgeist.org/opentracker
synced 2025-08-04 06:45:37 +02:00
Avoid double free when iob_addbuf_free fails, thanks to Sami Farin
This commit is contained in:
parent
ba25d2b2a8
commit
0ebc0ed6a3
1 changed files with 1 additions and 2 deletions
3
proxy.c
3
proxy.c
|
@ -715,8 +715,7 @@ unlock_continue:
|
||||||
void *tmp = malloc( mem );
|
void *tmp = malloc( mem );
|
||||||
if( tmp ) {
|
if( tmp ) {
|
||||||
memcpy( tmp, ptr, mem );
|
memcpy( tmp, ptr, mem );
|
||||||
if( !iob_addbuf_free( &g_connections[i].outdata, tmp, mem ) )
|
iob_addbuf_free( &g_connections[i].outdata, tmp, mem );
|
||||||
free( tmp );
|
|
||||||
io_wantwrite( g_connections[i].fd );
|
io_wantwrite( g_connections[i].fd );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue