1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Fix memory leak of sidebar mode switcher boxes.

This commit is contained in:
QC 2015-01-04 13:24:08 +01:00
parent 4c92d1fc0c
commit 7ee64b258d

View file

@ -1668,6 +1668,16 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
int retv = state.retv;
menu_free_state ( &state );
// Free the switcher boxes.
// When state is free'ed we should no longer need these.
if ( config.sidebar_mode == TRUE ) {
for ( int j = 0; j < num_switchers; j++ ) {
textbox_free ( switchers[j].tb );
switchers[j].tb = NULL;
}
}
return retv;
}