1
0
Fork 0
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:
Dave Davenport 2015-12-23 17:03:00 +01:00
parent 270ec0c14b
commit 696d0a2fa0

View file

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