summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-01 12:15:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-04-01 12:16:56 +0100
commitf49e7e1608f2dac140f60bcae21d5c37f79fc41b (patch)
tree885f0e458d8d3caa3f50fbe45e5dad6e9b49f4f6 /src
parent073eb2c56f4794275eee40a825dbfe1232bb2690 (diff)
Free the partial header after failing to open the cursor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-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) {