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:
parent
4c92d1fc0c
commit
7ee64b258d
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue