summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file.c b/src/file.c
index 6c4f1bb..e3d7e61 100644
--- a/src/file.c
+++ b/src/file.c
@@ -713,7 +713,10 @@ XcursorXcFileLoadAllImages (XcursorFile *file)
}
images = XcursorImagesCreate (nimage);
if (!images)
+ {
+ _XcursorFileHeaderDestroy (fileHeader);
return NULL;
+ }
for (toc = 0; toc < fileHeader->ntoc; toc++)
{
switch (fileHeader->tocs[toc].type) {