summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/file.c b/src/file.c
index 0e26955..496d447 100644
--- a/src/file.c
+++ b/src/file.c
@@ -780,10 +780,14 @@ XcursorXcFileLoad (XcursorFile *file,
}
images = XcursorImagesCreate (nimage);
if (!images)
+ {
+ _XcursorFileHeaderDestroy (fileHeader);
return 0;
+ }
comments = XcursorCommentsCreate (ncomment);
if (!comments)
{
+ _XcursorFileHeaderDestroy (fileHeader);
XcursorImagesDestroy (images);
return 0;
}