[Pkg-e-commits] [SCM] Enlightenment DR17 support for freedesktop.org specs branch, upstream-vcs, updated. 064059eac795ae51a6f58c707e4c3fdcb75227ba
dj2
dj2 at alioth.debian.org
Tue Apr 8 21:44:34 UTC 2008
The following commit has been merged in the upstream-vcs branch:
commit b3fa8bc59b50c2888dcfbd10556499166436fb19
Author: dj2 <dj2>
Date: Tue Mar 18 04:01:41 2008 +0000
- patch from Michael <sECuRE+e17 at twice-irc dot de> to fix possible mem
leak in efreet_desktop
diff --git a/src/lib/efreet_desktop.c b/src/lib/efreet_desktop.c
index d3623bf..468e7af 100644
--- a/src/lib/efreet_desktop.c
+++ b/src/lib/efreet_desktop.c
@@ -1806,8 +1806,12 @@ efreet_desktop_command_path_absolute(const char *path)
/* relative url */
if (path[0] != '/')
{
- buf = malloc(size);
- if (!getcwd(buf, size)) return NULL;
+ if (!(buf = malloc(size))) return NULL;
+ if (!getcwd(buf, size))
+ {
+ FREE(buf);
+ return NULL;
+ }
len = strlen(buf);
if (buf[len-1] != '/') buf = efreet_string_append(buf, &size, &len, "/");
@@ -1816,6 +1820,6 @@ efreet_desktop_command_path_absolute(const char *path)
return buf;
}
- /* just dup an alreaady absolute buffer */
+ /* just dup an already absolute buffer */
return strdup(path);
}
--
Enlightenment DR17 support for freedesktop.org specs
More information about the Pkg-e-commits
mailing list