summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-03 06:25:05 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-06-03 06:25:05 +0000
commit2a564715e6d01bafdf4b701e125e45a77c2c404b (patch)
treecd5248a45cff3795a40919b0452e847b7a9532ca
parentddd281e6b9408c786cdc759cf7d1ec8972048658 (diff)
Coverity #1541: Double free of pointer "ranges" in call to "Xfree"
-rw-r--r--ChangeLog5
-rw-r--r--src/fontfile/fontfile.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ad3d914..c5b417e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-02 Alan Coopersmith <alan.coopersmith@sun.com>
+
+ * src/fontfile/fontfile.c (FontFileListOneFontWithInfo):
+ Coverity #1541: Double free of pointer "ranges" in call to "Xfree"
+
2006-06-01 Adam Jackson <ajax@freedesktop.org>
* include/X11/fonts/fontmisc.h:
diff --git a/src/fontfile/fontfile.c b/src/fontfile/fontfile.c
index 73804f8..6bfee87 100644
--- a/src/fontfile/fontfile.c
+++ b/src/fontfile/fontfile.c
@@ -1010,7 +1010,10 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
ret = (*scalable->renderer->GetInfoScalable)
(fpe, *pFontInfo, entry, &tmpName, fileName, &vals);
}
- if (ranges) xfree(ranges);
+ if (ranges) {
+ xfree(ranges);
+ ranges = NULL;
+ }
}
}
if (ret == Successful) return ret;