summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/Attrib.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 20b9b3e..afae7e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-18 Matthieu Herrb <matthieu.herrb@laas.fr>
+
+ * src/Attrib.c: XpmFreeExtensions
+ doublecheck that a pointer is not NULL before dereferencing it.
+ (Coverity CID 121).
+
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
diff --git a/src/Attrib.c b/src/Attrib.c
index c6b34d6..a6feb52 100644
--- a/src/Attrib.c
+++ b/src/Attrib.c
@@ -133,7 +133,7 @@ XpmFreeExtensions(extensions, nextensions)
XpmFree(ext->name);
nlines = ext->nlines;
for (j = 0, sptr = ext->lines; j < nlines; j++, sptr++)
- if (*sptr)
+ if (sptr && *sptr)
XpmFree(*sptr);
if (ext->lines)
XpmFree(ext->lines);