# HG changeset patch # User jwe # Date 798405493 0 # Node ID abaf21f34109699990f834896f031e29c21ac648 # Parent 76a0c05089d46fd4f8cd01cf4217eb0b209e5944 [project @ 1995-04-20 19:16:24 by jwe] diff -r 76a0c05089d4 -r abaf21f34109 kpathsea/pathsearch.c --- a/kpathsea/pathsearch.c Thu Apr 20 19:15:51 1995 +0000 +++ b/kpathsea/pathsearch.c Thu Apr 20 19:18:13 1995 +0000 @@ -265,7 +265,10 @@ /* Free the list space, if any (but not the elements). */ if (found) - free (found); + { + str_list_free (found); + free (found); + } } /* Free the expanded name we were passed. It can't be in the return @@ -327,8 +330,14 @@ kpse_path_search P3C(const_string, path, const_string, name, boolean, must_exist) { - string *ret_list = search (path, name, must_exist, false); - return *ret_list; + static string *ret_list; + + if (ret_list) + free (ret_list); + + ret_list = search (path, name, must_exist, false); + + return *ret_list; /* Freeing this is caller's responsibility */ } diff -r 76a0c05089d4 -r abaf21f34109 src/pt-misc.h --- a/src/pt-misc.h Thu Apr 20 19:15:51 1995 +0000 +++ b/src/pt-misc.h Thu Apr 20 19:18:13 1995 +0000 @@ -237,6 +237,8 @@ { public: tree_va_return_list (void) : SLList () { } + + ~tree_va_return_list (void) { } }; // List of expressions that make up a global statement.