Skip to content

Commit dbef7cb

Browse files
committed
automount: fix memleak in csd-autorun
guessed_content_type also has to be freed if non-NULL (no error) but empty.
1 parent efbb81b commit dbef7cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/automount/csd-autorun.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ autorun_guessed_content_type_callback (GObject *source_object,
798798
gpointer user_data)
799799
{
800800
GError *error;
801-
char **guessed_content_type;
801+
g_auto(GStrv) guessed_content_type = NULL;
802802
AutorunData *data = user_data;
803803
gboolean open_folder;
804804

@@ -822,7 +822,6 @@ autorun_guessed_content_type_callback (GObject *source_object,
822822
open_folder = TRUE;
823823
}
824824
}
825-
g_strfreev (guessed_content_type);
826825
} else {
827826
if (g_settings_get_boolean (data->settings, "automount-open")) {
828827
open_folder = TRUE;

0 commit comments

Comments
 (0)