From 94b2db834a1eedeb1b612b173b2fd519bacb6917 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 26 Nov 2010 23:46:41 +0000 Subject: kpsewhich --all plain, fix from Taco git-svn-id: svn://tug.org/texlive/trunk@20579 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/db.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Build/source/texk/kpathsea/db.c') diff --git a/Build/source/texk/kpathsea/db.c b/Build/source/texk/kpathsea/db.c index afacca560a0..b2aad8f34f4 100644 --- a/Build/source/texk/kpathsea/db.c +++ b/Build/source/texk/kpathsea/db.c @@ -607,6 +607,9 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names, return NULL; done = false; + ret = XTALLOC1 (str_list_type); + *ret = str_list_init (); + /* Handle each name. */ for (n = 0; !done && names[n]; n++) { name = names[n]; @@ -662,9 +665,6 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names, /* We have an ls-R db. Look up `try'. */ orig_dirs = db_dirs = hash_lookup (kpse->db, ctry); - ret = XTALLOC1 (str_list_type); - *ret = str_list_init (); - /* For each filename found, see if it matches the path element. For example, if we have .../cx/cmr10.300pk and .../ricoh/cmr10.300pk, and the path looks like .../cx, we don't want the ricoh file. */ @@ -727,8 +727,8 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names, if (path != path_elt) free((string)path); } - return ret; + return ret; } #if defined(KPSE_COMPAT_API) -- cgit v1.2.3