diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-26 23:46:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-26 23:46:41 +0000 |
commit | 94b2db834a1eedeb1b612b173b2fd519bacb6917 (patch) | |
tree | 20f66012232b40f31fd8a338ac67b82aadf0fc6f /Build/source/texk/kpathsea/db.c | |
parent | a881f79f85c5ae2491b5448cd8bc0d5a28b55bf5 (diff) |
kpsewhich --all plain, fix from Taco
git-svn-id: svn://tug.org/texlive/trunk@20579 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/db.c')
-rw-r--r-- | Build/source/texk/kpathsea/db.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) |