summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2006-03-18 15:18:56 +0000
committerMatthieu Herrb <matthieu.herrb@laas.fr>2006-03-18 15:18:56 +0000
commit2dcc187c92c1a579e6e9f0bad999a3b4e47228c3 (patch)
treeb6f34fd3f9bb6c8e49a53680e64d8cd2e16607ae /src
parent93421a53ccf159ff39bc9f8ff72c57246f9cb90c (diff)
downloadxorg-lib-libXpm-2dcc187c92c1a579e6e9f0bad999a3b4e47228c3.tar.gz
doublecheck that a pointer is not NULL before dereferencing it. (CoverityXORG-7_0_99_901
CID 121).
Diffstat (limited to 'src')
-rw-r--r--src/Attrib.c2
1 files changed, 1 insertions, 1 deletions
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);