2005-07-15 Tollef Fog Heen <tfheen@err.no>

Author: tfheen
Date: 2005-07-15 08:22:55 GMT
2005-07-15  Tollef Fog Heen  <tfheen@err.no>

        * 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
This commit is contained in:
Arch Librarian 2005-07-15 13:08:02 +00:00
parent c261155300
commit f4ef194406
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2005-07-15 Tollef Fog Heen <tfheen@err.no>
* 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

2
pkg.c
View file

@ -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));