From d6b7a342e514f656c3b950c8d76ca9f77d53444a Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 3 Oct 2008 02:48:15 +0000 Subject: [PATCH] (mdatabase__find_file): Return a copy of filename if it is absolute pathname. --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index e0f4451..887f46a 100644 --- a/src/database.c +++ b/src/database.c @@ -1061,7 +1061,7 @@ mdatabase__find_file (char *filename) MDatabaseInfo db_info; if (filename[0] == PATH_SEPARATOR) - return (stat (filename, &buf) == 0 ? filename : NULL); + return (stat (filename, &buf) == 0 ? strdup (filename) : NULL); db_info.filename = filename; db_info.len = strlen (filename); db_info.time = 0; -- 1.7.10.4