mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Fix some memory leaks.
This commit is contained in:
parent
c63e03fd49
commit
294a22f3dd
5 changed files with 10 additions and 0 deletions
|
@ -726,6 +726,7 @@ if ( queue == NULL ) {
|
|||
if ( po->type == PT_STRING_ALLOC ) {
|
||||
g_free( po->malloc_str);
|
||||
}
|
||||
g_free ( po->filename );
|
||||
g_free ( po );
|
||||
}
|
||||
po = g_queue_peek_head ( file_queue );
|
||||
|
@ -874,6 +875,7 @@ gboolean rofi_theme_parse_file ( const char *file )
|
|||
if ( po->type == PT_STRING_ALLOC ) {
|
||||
g_free( po->malloc_str);
|
||||
}
|
||||
g_free ( po->filename );
|
||||
g_free ( po );
|
||||
}
|
||||
}
|
||||
|
@ -910,6 +912,7 @@ gboolean rofi_theme_parse_string ( const char *string )
|
|||
if ( po->type == PT_STRING_ALLOC ) {
|
||||
g_free( po->malloc_str);
|
||||
}
|
||||
g_free ( po->filename );
|
||||
g_free ( po );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,6 +322,7 @@ t_main
|
|||
ThemeWidget *d = $2->widgets[i];
|
||||
rofi_theme_parse_merge_widgets(rofi_theme, d);
|
||||
}
|
||||
rofi_theme_free ( $2 );
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -392,6 +393,7 @@ t_entry_list:
|
|||
ThemeWidget *d = $9->widgets[i];
|
||||
rofi_theme_parse_merge_widgets(widget, d);
|
||||
}
|
||||
g_free ( $4 );
|
||||
g_free ( name );
|
||||
}
|
||||
| t_entry_list T_MEDIA T_PARENT_LEFT T_STRING T_PSEP T_DOUBLE T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE {
|
||||
|
@ -405,6 +407,7 @@ t_entry_list:
|
|||
ThemeWidget *d = $9->widgets[i];
|
||||
rofi_theme_parse_merge_widgets(widget, d);
|
||||
}
|
||||
g_free ( $4 );
|
||||
g_free ( name );
|
||||
}
|
||||
| t_entry_list T_MEDIA T_PARENT_LEFT T_STRING T_PSEP T_INT T_UNIT_PX T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE {
|
||||
|
@ -418,6 +421,7 @@ t_entry_list:
|
|||
ThemeWidget *d = $10->widgets[i];
|
||||
rofi_theme_parse_merge_widgets(widget, d);
|
||||
}
|
||||
g_free ( $4 );
|
||||
g_free ( name );
|
||||
}
|
||||
;
|
||||
|
|
|
@ -1259,6 +1259,7 @@ static void drun_mode_destroy(Mode *sw) {
|
|||
g_free(rmpd->old_completer_input);
|
||||
g_free(rmpd->old_input);
|
||||
mode_destroy(rmpd->completer);
|
||||
g_free(rmpd->completer);
|
||||
|
||||
g_strfreev(rmpd->current_desktop_list);
|
||||
g_strfreev(rmpd->show_categories);
|
||||
|
|
|
@ -300,6 +300,7 @@ static void get_file_browser(Mode *sw) {
|
|||
}
|
||||
closedir(dir);
|
||||
}
|
||||
g_free(cdir);
|
||||
g_qsort_with_data(pd->array, pd->array_length, sizeof(FBFile), compare, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -401,6 +401,7 @@ static void run_mode_destroy(Mode *sw) {
|
|||
g_free(rmpd->old_input);
|
||||
g_free(rmpd->old_completer_input);
|
||||
mode_destroy(rmpd->completer);
|
||||
g_free(rmpd->completer);
|
||||
g_free(rmpd);
|
||||
sw->private_data = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue