GNOME Bugzilla – Bug 754241
[PATCH] Fix memory leaks in gexiv2-metadata-gps.cpp
Last modified: 2016-04-30 06:18:19 UTC
Created attachment 310187 [details] [review] Fix leaks in gexiv2_metadata_get_gps_longitude() I have found those accidentally while trying to look at viking, by executing it's tests with ASan-build. Pointer returned from gexiv2_metadata_get_{exif,xmp,iptc}_tag_string functions should be g_free'd, else we've got a memory leak.
Created attachment 310188 [details] [review] Fix leaks in gexiv2_metadata_get_gps_latitude()
Created attachment 310189 [details] [review] Fix leaks in gexiv2_metadata_get_gps_altitude()
Those leaks + patches are for git master version - with last commit 59977b0fb1c1942b8e97fc3e4519fbf24679e23b
That looks a bit unelegant from a C++ PoV but I guess there's no better way with malloc data. Thanks!
Wow. That code does a memcopy just to check to tag existence. That might be expensive
Pushed with minor commit message adjustments