You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
2 years ago
|
Index: imlib-1.9.15/Imlib/load.c
|
||
|
===================================================================
|
||
|
--- imlib-1.9.15.orig/Imlib/load.c
|
||
|
+++ imlib-1.9.15/Imlib/load.c
|
||
|
@@ -489,13 +489,21 @@ _LoadGIF(ImlibData * id, FILE *f, int *w
|
||
|
rows = malloc(*h * sizeof(GifRowType *));
|
||
|
if (!rows)
|
||
|
{
|
||
|
+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
|
||
|
+ DGifCloseFile(gif, NULL);
|
||
|
+#else
|
||
|
DGifCloseFile(gif);
|
||
|
+#endif
|
||
|
return NULL;
|
||
|
}
|
||
|
data = _imlib_malloc_image(*w, *h);
|
||
|
if (!data)
|
||
|
{
|
||
|
+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
|
||
|
+ DGifCloseFile(gif, NULL);
|
||
|
+#else
|
||
|
DGifCloseFile(gif);
|
||
|
+#endif
|
||
|
free(rows);
|
||
|
return NULL;
|
||
|
}
|
||
|
@@ -506,7 +514,11 @@ _LoadGIF(ImlibData * id, FILE *f, int *w
|
||
|
rows[i] = malloc(*w * sizeof(GifPixelType));
|
||
|
if (!rows[i])
|
||
|
{
|
||
|
+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
|
||
|
+ DGifCloseFile(gif, NULL);
|
||
|
+#else
|
||
|
DGifCloseFile(gif);
|
||
|
+#endif
|
||
|
for (i = 0; i < *h; i++)
|
||
|
if (rows[i])
|
||
|
free(rows[i]);
|
||
|
@@ -595,7 +607,11 @@ _LoadGIF(ImlibData * id, FILE *f, int *w
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
|
||
|
+ DGifCloseFile(gif, NULL);
|
||
|
+#else
|
||
|
DGifCloseFile(gif);
|
||
|
+#endif
|
||
|
for (i = 0; i < *h; i++)
|
||
|
free(rows[i]);
|
||
|
free(rows);
|