diff options
author | Sean Fox <dyntryx@gmail.com> | 2008-06-26 23:47:31 +0000 |
---|---|---|
committer | Sean Fox <dyntryx@gmail.com> | 2008-06-26 23:47:31 +0000 |
commit | 5d7db2d67b65963955beb05d30184ac28d898ddb (patch) | |
tree | a94713469a3c066e0c0241f6463644e3c2793fff | |
parent | 8083eae40da40bc00ac2dd21382cbbd84e492f8e (diff) | |
download | libnsgif-5d7db2d67b65963955beb05d30184ac28d898ddb.tar.gz libnsgif-5d7db2d67b65963955beb05d30184ac28d898ddb.tar.bz2 |
Minor corrections; lib caller must now free gif_data
svn path=/branches/dynis/libnsgif/; revision=4459
-rw-r--r-- | examples/decode_gif.c | 4 | ||||
-rw-r--r-- | libnsgif.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/decode_gif.c b/examples/decode_gif.c index 9c7a40f..5e136c7 100644 --- a/examples/decode_gif.c +++ b/examples/decode_gif.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) }; gif_animation gif; size_t size; - int code; + gif_result code; unsigned int i; if (argc != 2) { @@ -151,7 +151,7 @@ unsigned char *load_file(const char *path, size_t *data_size) } -void warning(const char *context, int code) +void warning(const char *context, gif_result code) { fprintf(stderr, "%s failed: ", context); switch (code) @@ -59,7 +59,8 @@ or perform the check itself. It should be noted that gif_finalise() should always be called, even if - no frames were initialised. + no frames were initialised. Additionally, it is the responsibility of + the caller to free 'gif_data'. [rjw] - Fri 2nd April 2004 */ @@ -1100,8 +1101,6 @@ void gif_finalise(gif_animation *gif) { gif->local_colour_table = NULL; free(gif->global_colour_table); gif->global_colour_table = NULL; - free(gif->gif_data); - gif->gif_data = NULL; } /** |