+2000-01-16 Gary V. Vaughan <gary@oranda.demon.co.uk>
+
+ * libltdl/ltdl.c (find_file): memory error fixed.
+
2000-01-14 Gary V. Vaughan <gary@oranda.demon.co.uk>
* ltconfig.in (Usage): Now it matches the code!
char *filename = 0;
int filenamesize = 0;
int lenbase = strlen(basename);
- char *next = 0;
+ char *canonical = 0, *next = 0;
if (!search_path || !*search_path) {
last_error = file_not_found_error;
return 0;
}
- next = canonicalize_path (search_path);
- if (!next) {
+ canonical = canonicalize_path (search_path);
+ if (!canonical) {
last_error = memory_error;
goto cleanup;
}
+ next = canonical;
while (next) {
int lendir;
char *cur = next;
cleanup:
if (filename)
lt_dlfree(filename);
- lt_dlfree(next);
+ if (canonical)
+ lt_dlfree(canonical);
return result;
}