diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-06 18:54:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-31 17:05:53 +0300 |
commit | a6d2fd0215c4f4507281aaf37f456771841ee6b1 (patch) | |
tree | 059707346b9b8bca4e59bd0c4d6d8feaba54d8c5 /source/blender/blenkernel/intern/image.c | |
parent | 7fb393f9ba3866026c8fb2c5c5ef7e0906cfe8b4 (diff) |
Stamp info: Use dedicated function to free up memory
This way it's more flexible to extend StampData structure
with additional stuff which might require memory free.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 54f0923cabc..7706bf921f4 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2124,6 +2124,14 @@ void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCall #undef CALL } +void BKE_stamp_data_free(struct StampData *stamp_data) +{ + if (stamp_data == NULL) { + return; + } + MEM_freeN(stamp_data); +} + /* wrap for callback only */ static void metadata_change_field(void *data, const char *propname, char *propvalue, int UNUSED(len)) { |