File 06_lensfun_destroy_cleanup.patch of Package ufraw
Description: Fix cleanup of lensfun
Bug-Debian: https://bugs.debian.org/898297
Author: Helmut Grohne <helmut@subdivi.de>, Lauro Moura <lauromoura@gmail.com>
Reviewed-by: Hubert Chathi <uhoreg@debian.org>
Last-Update: 2018-12-02
--- ufraw-0.22.orig/ufraw_ufraw.c
+++ ufraw-0.22/ufraw_ufraw.c
@@ -767,8 +767,10 @@ void ufraw_close(ufraw_data *uf)
g_free(uf->displayProfile);
g_free(uf->RawHistogram);
#ifdef HAVE_LENSFUN
- lf_modifier_destroy(uf->TCAmodifier);
- lf_modifier_destroy(uf->modifier);
+ if (uf->TCAmodifier != NULL)
+ lf_modifier_destroy(uf->TCAmodifier);
+ if (uf->modifier != NULL)
+ lf_modifier_destroy(uf->modifier);
#endif
ufobject_delete(uf->conf->ufobject);
g_free(uf->conf);