it seems that this variable in e_exec does not actually need to be strdup()ed, and...
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 14 Dec 2012 09:13:07 +0000 (09:13 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 14 Dec 2012 09:13:07 +0000 (09:13 +0000)
SVN revision: 80923

src/bin/e_exec.c

index 3c49c70..c9f4780 100644 (file)
@@ -312,7 +312,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
    E_Exec_Launch *launch;
    Eina_List *l, *lnew;
    Ecore_Exe *exe = NULL;
-   char *penv_display;
+   const char *penv_display;
    char buf[4096];
 
    launch = data;
@@ -330,7 +330,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
    if (++startup_id < 1) startup_id = 1;
    /* save previous env vars we need to save */
    penv_display = getenv("DISPLAY");
-   if (penv_display) penv_display = strdup(penv_display);
    if ((penv_display) && (launch->zone))
      {
         const char *p1, *p2;
@@ -347,7 +346,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
         if (penv_display_length + 32 > 4096)
           {
              free(inst);
-             free(penv_display);
              return NULL;
           }
 
@@ -463,10 +461,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
      }
 
    if (penv_display)
-     {
-        e_util_env_set("DISPLAY", penv_display);
-        free(penv_display);
-     }
+     e_util_env_set("DISPLAY", penv_display);
    if (!exe)
      {
         free(inst);