diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-10 12:33:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-10 12:33:24 (GMT) |
| commit | 49a164b7ba69db5f8e50ee2576d0101a5304d860 (patch) | |
| tree | 7111e313a0bb0e1b2ebf8afeb069a8053a5d1d1e /src/graphics.c | |
| parent | 8084ae388effc43a833afef016440360013b9141 (diff) | |
| download | powder-49a164b7ba69db5f8e50ee2576d0101a5304d860.zip powder-49a164b7ba69db5f8e50ee2576d0101a5304d860.tar.gz | |
Fix various memory leaks, as noted by Merkil/cppcheck
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c index 6f46c57..3d51cb6 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -111,6 +111,7 @@ pixel *ptif_unpack(void *datain, int size, int *w, int *h){ free(green_chan); free(blue_chan); free(undata); + free(result); return NULL; } if(i != (width*height)*3){ @@ -119,6 +120,7 @@ pixel *ptif_unpack(void *datain, int size, int *w, int *h){ free(green_chan); free(blue_chan); free(undata); + free(result); return NULL; } memcpy(red_chan, undata, width*height); |
