diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-21 17:27:30 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-21 17:54:36 +0300 |
commit | d4342b38971b26d50d86e1bb47fed804db1aef6d (patch) | |
tree | 4fe6a735abe3df480a2056ba94377b09edd1aa4d /source/blender/blenkernel | |
parent | 2969b308130e44538b8e40a1c17a434f5aa29062 (diff) |
Fix (unreported) memleak in image copy function.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 44bea5c8138..017eb41cd49 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -456,7 +456,8 @@ Image *BKE_image_copy(Main *bmain, Image *ima) copy_image_packedfiles(&nima->packedfiles, &ima->packedfiles); - nima->stereo3d_format = MEM_dupallocN(ima->stereo3d_format); + /* nima->stere3d_format is already allocated by image_alloc... */ + *nima->stereo3d_format = *ima->stereo3d_format; BLI_duplicatelist(&nima->views, &ima->views); BKE_previewimg_id_copy(&nima->id, &ima->id); |