mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
Fix 1 off memory leak
This commit is contained in:
parent
270ec0c14b
commit
696d0a2fa0
1 changed files with 5 additions and 1 deletions
|
@ -93,8 +93,12 @@ static char **get_dmenu ( FILE *fd, unsigned int *length )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( data != NULL ) {
|
||||||
|
free ( data );
|
||||||
|
data = NULL;
|
||||||
|
}
|
||||||
if ( retv != NULL ) {
|
if ( retv != NULL ) {
|
||||||
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
||||||
retv[( *length ) ] = NULL;
|
retv[( *length ) ] = NULL;
|
||||||
}
|
}
|
||||||
TICK_N ( "Read stdin STOP" );
|
TICK_N ( "Read stdin STOP" );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue