diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/targa.c | 5 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 5 |
4 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 155d5a7d21c..1577eb4f850 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -2189,7 +2189,7 @@ static void where_is_pose_bone(Object *ob, bPoseChannel *pchan, float ctime) Mat4MulSerie(pchan->pose_mat, tmat, offs_bone, pchan->chan_mat, NULL, NULL, NULL, NULL, NULL); } else if(bone->flag & BONE_NO_SCALE) { - float orthmat[4][4], vec[3]; + float orthmat[4][4]; /* get the official transform, but we only use the vector from it (optimize...) */ Mat4MulSerie(pchan->pose_mat, parchan->pose_mat, offs_bone, pchan->chan_mat, NULL, NULL, NULL, NULL, NULL); diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index f6a65bd72a5..d0925a641e3 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -383,6 +383,8 @@ int checkPackedFile(char * filename, PackedFile * pf) } } } + + close(file); } } diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 303e5685503..6a974464f56 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -289,7 +289,10 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags) fildes = fopen(name,"wb"); if (!fildes) return 0; - if (fwrite(buf, 1, 18,fildes) != 18) return (0); + if (fwrite(buf, 1, 18,fildes) != 18) { + fclose(fildes); + return (0); + } if (ibuf->cmap){ for (i = 0 ; i<ibuf->maxcol ; i++){ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index b4deb1f2b60..7529f2140a5 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -483,15 +483,18 @@ static void *read_file_data(char *filename, int *len_r) data= MEM_mallocN(*len_r, "read_file_data"); if (!data) { *len_r= -1; + fclose(fp); return NULL; } if (fread(data, *len_r, 1, fp)!=1) { *len_r= -1; MEM_freeN(data); + fclose(fp); return NULL; } - + + fclose(fp); return data; } |