xserver: Branch 'master'
Paulo Cesar Pereira de Andrade
pcpa at kemper.freedesktop.org
Wed Jan 7 17:20:51 PST 2009
hw/xfree86/common/xf86Config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9a313fb03153eb764aab3e9cb9988b6603541637
Author: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
Date: Wed Jan 7 23:07:01 2009 -0200
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.
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 198b20f..a8b568f 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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;
More information about the xorg-commit
mailing list