summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-06-03 10:23:57 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-06-03 10:23:57 +0000
commitc6f65af419d14a753459a71a671baafd84fa1330 (patch)
tree3221b461e94445dc789ae7ae658bb47490ac8033 /src
parent8adc6fe181991af8befb0f365360e9a68357da29 (diff)
downloadxorg-lib-libXcursor-c6f65af419d14a753459a71a671baafd84fa1330.tar.gz
Bug #5268: Fix small memory leak. (Matthias Clasen). Change some return 0sxcursor-1_1_7
to NULL. Bump to 1.1.7.
Diffstat (limited to 'src')
-rw-r--r--src/file.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/file.c b/src/file.c
index de17004..368961b 100644
--- a/src/file.c
+++ b/src/file.c
@@ -655,16 +655,22 @@ XcursorXcFileLoadImages (XcursorFile *file, int size)
int toc;
if (!file || size < 0)
- return 0;
+ return NULL;
fileHeader = _XcursorReadFileHeader (file);
if (!fileHeader)
- return 0;
+ return NULL;
bestSize = _XcursorFindBestSize (fileHeader, (XcursorDim) size, &nsize);
if (!bestSize)
- return 0;
+ {
+ _XcursorFileHeaderDestroy (fileHeader);
+ return NULL;
+ }
images = XcursorImagesCreate (nsize);
if (!images)
- return 0;
+ {
+ _XcursorFileHeaderDestroy (fileHeader);
+ return NULL;
+ }
for (n = 0; n < nsize; n++)
{
toc = _XcursorFindImageToc (fileHeader, bestSize, n);