diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-06-25 16:20:40 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-06-25 16:20:40 -0700 |
commit | 45cf68a160f94d1091c3e5c69237505b138daf25 (patch) | |
tree | 33b3c29257f6f983b90174caeaa03f60c856de69 /src/gif.c | |
parent | 665c97078cfa687273e89c8b969d08f5290bcc01 (diff) | |
download | mirror-meh-45cf68a160f94d1091c3e5c69237505b138daf25.tar.gz mirror-meh-45cf68a160f94d1091c3e5c69237505b138daf25.tar.bz2 mirror-meh-45cf68a160f94d1091c3e5c69237505b138daf25.zip |
added close method. Fixed all known memory leaks
Diffstat (limited to 'src/gif.c')
-rw-r--r-- | src/gif.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -77,13 +77,18 @@ static int gif_read(struct image *img){ img->buf[j++] = colormap[idx].Blue; } - DGifCloseFile(g->gif); - return 0; } +void gif_close(struct image *img){ + struct gif_t *g = (struct gif_t *)img; + DGifCloseFile(g->gif); + fclose(g->f); +} + struct imageformat giflib = { gif_open, - gif_read + gif_read, + gif_close }; |