mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05: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;
|
||||
}
|
||||
}
|
||||
if ( data != NULL ) {
|
||||
free ( data );
|
||||
data = NULL;
|
||||
}
|
||||
if ( retv != NULL ) {
|
||||
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
||||
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
||||
retv[( *length ) ] = NULL;
|
||||
}
|
||||
TICK_N ( "Read stdin STOP" );
|
||||
|
|
Loading…
Reference in a new issue