diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-28 17:00:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-28 17:01:20 +0300 |
commit | 61d6fa92c5c91b1a7ed86d942b3b8e5f09fa4106 (patch) | |
tree | 5712a686cc7024ef9783318ce6d7014df89923ab /source/blender | |
parent | 0ae2ade17a2820f5c5a3f5c41933e3c46875efcd (diff) |
Correct recent error passing NULL to fclose
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 91df103bc7b..260a23c41dc 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -320,10 +320,11 @@ void *BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t * } *r_size = filelen_read; - } finally: - fclose(fp); + fclose(fp); + } + return mem; } @@ -353,10 +354,11 @@ void *BLI_file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t } *r_size = filelen_read; - } finally: - fclose(fp); + fclose(fp); + } + return mem; } |