Mercurial > hg > octave-terminal
changeset 1269:abaf21f34109
[project @ 1995-04-20 19:16:24 by jwe]
author | jwe |
---|---|
date | Thu, 20 Apr 1995 19:18:13 +0000 |
parents | 76a0c05089d4 |
children | 0a5e9e8892a0 |
files | kpathsea/pathsearch.c src/pt-misc.h |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kpathsea/pathsearch.c +++ b/kpathsea/pathsearch.c @@ -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 */ }