Skip to content

Commit

Permalink
[eglib] Fix a possible memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumpera committed Jan 17, 2014
1 parent 87bbf05 commit 20149a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eglib/src/gpath.c
Expand Up @@ -216,8 +216,8 @@ strtok_r(char *s, const char *delim, char **last)
gchar *
g_find_program_in_path (const gchar *program)
{
char *p = g_strdup (g_getenv ("PATH"));
char *x = p, *l;
char *p;
char *x, *l;
gchar *curdir = NULL;
char *save = NULL;
#ifdef G_OS_WIN32
Expand All @@ -228,6 +228,7 @@ g_find_program_in_path (const gchar *program)
#endif

g_return_val_if_fail (program != NULL, NULL);
x = p = g_strdup (g_getenv ("PATH"));

if (x == NULL || *x == '\0') {
curdir = g_get_current_dir ();
Expand Down

0 comments on commit 20149a0

Please sign in to comment.