diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index ced4d90e6..e570f7e77 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -918,7 +918,7 @@ static void OpenNdsDialog() GtkRecentData recentData; gchar *uri; memset(&recentData, 0, sizeof(GtkRecentData)); - recentData.mime_type = "application/x-nintendo-ds-rom"; + recentData.mime_type = g_strdup("application/x-nintendo-ds-rom"); recentData.app_name = (gchar *) g_get_application_name (); recentData.app_exec = g_strjoin (" ", g_get_prgname (), "%f", NULL); @@ -928,6 +928,7 @@ static void OpenNdsDialog() gtk_recent_manager_add_full (manager, uri, &recentData); g_free(uri); + g_free(recentData.app_name); g_free(recentData.app_exec); #endif gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "run"), TRUE);