From: handa Date: Fri, 3 Oct 2008 02:48:15 +0000 (+0000) Subject: (mdatabase__find_file): Return a copy of filename if X-Git-Tag: REL-1-5-3~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d6b7a342e514f656c3b950c8d76ca9f77d53444a;p=m17n%2Fm17n-lib.git (mdatabase__find_file): Return a copy of filename if it is absolute pathname. --- 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;