Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-26 23:23:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-26 23:23:13 +0300
commitd5592fe254c7061ca8bbcea93b6098dc9bf3d683 (patch)
tree740a09af66dbfe68763d2d9b721479e67bafe434 /source/blender/imbuf/intern/targa.c
parent5689ab39754dcd7229f616e3eed206bea5611545 (diff)
fixes for errors/warnings found with cppcheck
Diffstat (limited to 'source/blender/imbuf/intern/targa.c')
-rw-r--r--source/blender/imbuf/intern/targa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index c89bc6a632f..acc3e06448f 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -296,7 +296,10 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
if (ibuf->cmap){
for (i = 0 ; i<ibuf->maxcol ; i++){
- if (fwrite(((uchar *)(ibuf->cmap + i)) + 1,1,3,fildes) != 3) return (0);
+ if (fwrite(((uchar *)(ibuf->cmap + i)) + 1,1,3,fildes) != 3) {
+ fclose(fildes);
+ return (0);
+ }
}
}