more evry apps leaks and wrong E_FREE usage
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 13 Dec 2012 14:09:55 +0000 (14:09 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 13 Dec 2012 14:09:55 +0000 (14:09 +0000)
SVN revision: 80856

src/modules/everything/evry_plug_apps.c

index ec79847..0ff98a6 100644 (file)
@@ -1031,17 +1031,18 @@ _open_term_action(Evry_Action *act)
 
    if (dir)
      {
-        if (!getcwd(cwd, sizeof(cwd)))
-          return 0;
-        if (chdir(dir))
-          return 0;
+        if ((!getcwd(cwd, sizeof(cwd))) || (chdir(dir)))
+          {
+             free(dir);
+             return 0;
+          }
 
         tmp = E_NEW(Evry_Item_App, 1);
         tmp->file = _conf->cmd_terminal;
 
         ret = evry->util_exec_app(EVRY_ITEM(tmp), NULL);
-        E_FREE(tmp);
-        E_FREE(dir);
+        free(tmp);
+        free(dir);
         if (chdir(cwd))
           return 0;
      }