mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Plug leak
This commit is contained in:
parent
272211fbcd
commit
548270776d
@ -103,7 +103,12 @@ forkandexec(
|
|||||||
if ( (*rfp = fdopen( c2p[0], "r" )) == NULL || (*wfp = fdopen( p2c[1],
|
if ( (*rfp = fdopen( c2p[0], "r" )) == NULL || (*wfp = fdopen( p2c[1],
|
||||||
"w" )) == NULL ) {
|
"w" )) == NULL ) {
|
||||||
Debug( LDAP_DEBUG_ANY, "fdopen failed\n", 0, 0, 0 );
|
Debug( LDAP_DEBUG_ANY, "fdopen failed\n", 0, 0, 0 );
|
||||||
|
if ( *rfp ) {
|
||||||
|
fclose( *rfp );
|
||||||
|
*rfp = NULL;
|
||||||
|
} else {
|
||||||
close( c2p[0] );
|
close( c2p[0] );
|
||||||
|
}
|
||||||
close( p2c[1] );
|
close( p2c[1] );
|
||||||
|
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user