summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-10-10 13:46:17 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2006-10-10 13:46:17 -0700
commitb6b9f5885566e4c2df8e3319fe092c22f319983f (patch)
treeda49a5ae1aa9b8533fd357bc0ca51a275389f57c
parentd0e12a97849871b0b2af04bf8d7a3839c54b31a8 (diff)
Fix lint warning: deallocating a pointer that could be NULL: library.c(266)
-rw-r--r--src/library.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library.c b/src/library.c
index 3c058ef..ea59912 100644
--- a/src/library.c
+++ b/src/library.c
@@ -263,7 +263,8 @@ XcursorScanTheme (const char *theme, const char *name)
*/
for (i = inherits; i && f == 0; i = _XcursorNextPath (i))
f = XcursorScanTheme (i, name);
- free (inherits);
+ if (inherits != NULL)
+ free (inherits);
return f;
}