Don't call free, use xfree macro.

There are several other direct calls to free, check
% egrep '\<free\(' `find . -name \*.c`
but they are free'ing memory from explicit malloc calls.
This one was not intended, and corrected, so that it would
both, follow the conventions everywhere (and work on some
libc that doesn't like free(0)), and make it easier to use
malloc wrappers.
This commit is contained in:
Paulo Cesar Pereira de Andrade 2009-01-07 23:07:01 -02:00
parent 49b93df8a3
commit 9a313fb031

View File

@ -620,9 +620,9 @@ configFiles(XF86ConfFilesPtr fileconf)
must_copy = FALSE;
}
/* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath;
temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath;
defaultFontPath = xf86ValidateFontPath(temp_path);
free(temp_path);
xfree(temp_path);
/* make fontpath more readable in the logfiles */
countDirs = 1;