Free the partial header after failing to open the cursor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-04-01 12:15:46 +01:00
parent 073eb2c56f
commit f49e7e1608

View file

@ -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) {