diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-09-26 00:52:17 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-09-26 00:52:17 +0000 |
commit | daa3dc4ab509855aa2dd02e272170e38ed4bb7f4 (patch) | |
tree | 79984f7d22fff6d7751bfa2155f78e946b603a8d /src | |
parent | 6e23b3451f62feaf6a507a085f60b5f94a1365aa (diff) | |
download | xine-lib-daa3dc4ab509855aa2dd02e272170e38ed4bb7f4.tar.gz xine-lib-daa3dc4ab509855aa2dd02e272170e38ed4bb7f4.tar.bz2 |
Free the filename string and close the file pointer when returning.
Found by Coverity Scan.
CVS patchset: 8283
CVS date: 2006/09/26 00:52:17
Diffstat (limited to 'src')
-rw-r--r-- | src/libxineadec/nosefart/nsf.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libxineadec/nosefart/nsf.c b/src/libxineadec/nosefart/nsf.c index 477106c66..6bbc96423 100644 --- a/src/libxineadec/nosefart/nsf.c +++ b/src/libxineadec/nosefart/nsf.c @@ -20,7 +20,7 @@ ** nsf.c ** ** NSF loading/saving related functions -** $Id: nsf.c,v 1.3 2003/08/25 21:51:43 f1rmb Exp $ +** $Id: nsf.c,v 1.4 2006/09/26 00:52:17 dgp85 Exp $ */ #include <stdio.h> @@ -426,8 +426,11 @@ nsf_t *nsf_load(char *filename, void *source, int length) } temp_nsf = malloc(sizeof(nsf_t)); - if (NULL == temp_nsf) - return NULL; + if (NULL == temp_nsf) { + fclose(fp); + free(new_fn); + return NULL; + } /* Read in the header */ if (NULL == source) @@ -579,6 +582,11 @@ void nsf_setfilter(nsf_t *nsf, int filter_type) /* ** $Log: nsf.c,v $ +** Revision 1.4 2006/09/26 00:52:17 dgp85 +** Free the filename string and close the file pointer when returning. +** +** Found by Coverity Scan. +** ** Revision 1.3 2003/08/25 21:51:43 f1rmb ** Reduce GCC verbosity (various prototype declaration fixes). ffmpeg, wine and fft*post are untouched (fft: for now). ** |