From: Arch Librarian Date: Fri, 15 Jul 2005 13:08:02 +0000 (+0000) Subject: 2005-07-15 Tollef Fog Heen X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ef1944064c2879cd21cda38147b1b2f87ea7f4;p=pkg-config 2005-07-15 Tollef Fog Heen Author: tfheen Date: 2005-07-15 08:22:55 GMT 2005-07-15 Tollef Fog Heen * pkg.c (package_get_var): Make sure to g_strdup all the return values and not return some values which should not be freed and some which should. Yay valgrind. Freedesktop #3682 --- diff --git a/ChangeLog b/ChangeLog index abc9b0a..15fcf77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-07-15 Tollef Fog Heen + * pkg.c (package_get_var): Make sure to g_strdup all the return + values and not return some values which should not be freed and + some which should. Yay valgrind. Freedesktop #3682 + * configure.in: Fix default search path to be pkgconfig rather than pkg-config again. Freedesktop #3662 diff --git a/pkg.c b/pkg.c index 435a4b4..70ff9ce 100644 --- a/pkg.c +++ b/pkg.c @@ -1200,7 +1200,7 @@ package_get_var (Package *pkg, char *varval = NULL; if (globals) - varval = g_hash_table_lookup (globals, var); + varval = g_strdup (g_hash_table_lookup (globals, var)); if (varval == NULL && pkg->vars) varval = g_strdup (g_hash_table_lookup (pkg->vars, var));