aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_exec.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-14 09:13:07 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-14 09:13:07 +0000
commit799e6b5a5e8142f10e967794d440fa57a44255a0 (patch)
treebc2a1999a8821cca4569059014ccd97c4c434f55 /src/bin/e_exec.c
parent31b66a272e713fcb7611b7284e7409bff287ed16 (diff)
downloadenlightenment-799e6b5a5e8142f10e967794d440fa57a44255a0.tar.gz
enlightenment-799e6b5a5e8142f10e967794d440fa57a44255a0.tar.xz
enlightenment-799e6b5a5e8142f10e967794d440fa57a44255a0.zip
it seems that this variable in e_exec does not actually need to be strdup()ed, and thus does not need to leak...
SVN revision: 80923
Diffstat (limited to 'src/bin/e_exec.c')
-rw-r--r--src/bin/e_exec.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 3c49c7043..c9f4780af 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -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);