From 3ce34049ebf0594bebec91da6bef4bf6a1208d1e Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 19 Feb 2004 10:36:06 +0000 Subject: [PATCH] some fixes from jdahlin Original commit message from CVS: some fixes from jdahlin --- ChangeLog | 4 ++++ tools/gst-run.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bd2e163eb..a7e10be379 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-19 Thomas Vander Stichele + + * tools/gst-run.c: (get_candidates), (main): some fixes from jdahlin + 2004-02-18 kost@imn.htwk-leipzig.de reviewed by: David Schleef diff --git a/tools/gst-run.c b/tools/gst-run.c index 4ed064ac82..b5bc2a58aa 100644 --- a/tools/gst-run.c +++ b/tools/gst-run.c @@ -237,7 +237,7 @@ get_candidates (const gchar * dir, const gchar * base) /* get all dirs from the path and prepend with given dir */ path = g_strdup_printf ("%s%c%s", - dir, G_SEARCHPATH_SEPARATOR, getenv ("PATH")); + dir, G_SEARCHPATH_SEPARATOR, g_getenv ("PATH")); dirs = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 0); g_free (path); @@ -311,7 +311,7 @@ int main ctx = poptGetContext ("gst-run", argc, (const char **) argv, options, 0); poptReadDefaultConfig (ctx, TRUE); while ((nextopt = poptGetNextOpt (ctx)) > 0) - ; + /* keep looping to parse */; argc = poptStrippedArgv (ctx, argc, argv); argv[argc] = NULL; @@ -353,6 +353,8 @@ int main binary = g_strdup_printf ("%s-%s", base, highest); } + g_free (base); + path = g_build_filename (dir, binary, NULL); g_free (binary); @@ -361,6 +363,7 @@ int main if (_arg_list_mm) { g_hash_table_foreach (candidates, (GHFunc) hash_print_key, NULL); + g_hash_table_destroy (candidates); return 0; }