From f6af66808f69b0d6ca54b8c94a6358738dfec495 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Tue, 9 Jun 2009 16:45:59 +0000 Subject: [PATCH] do not segv on executables that return non-zero. if an executable returns non-zero a dialog will be present with information, if it was a .desktop file, then it would use the "Name" field to name the log and all. However, the .desktop reference was deleted and the dialog would use a bogus pointer. Now we take a reference insidethe dialog and just release it on dialog deletion. Found by manio, fix by me. SVN revision: 40987 --- src/bin/e_exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c index bd58b9a12..3ee31a330 100644 --- a/src/bin/e_exec.c +++ b/src/bin/e_exec.c @@ -402,6 +402,7 @@ _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_ return; } cfdata->desktop = desktop; + if (cfdata->desktop) efreet_desktop_ref(cfdata->desktop); if (exec) cfdata->exec = strdup(exec); cfdata->error = error; cfdata->read = read; @@ -508,6 +509,8 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) if (cfdata->error) ecore_exe_event_data_free(cfdata->error); if (cfdata->read) ecore_exe_event_data_free(cfdata->read); + if (cfdata->desktop) efreet_desktop_free(cfdata->desktop); + E_FREE(cfdata->exec); E_FREE(cfdata->signal); E_FREE(cfdata->exit);