GNOME Bugzilla – Bug 564916
objects/SISSI/sissi_object.c:369: Memory leak: file_name
Last modified: 2009-01-02 14:12:25 UTC
In file objects/SISSI/sissi_object.c:369: Variable file_name leaks memory: file_name= g_strdup(object_sissi->file); /* this line could add url of file to the dia_get_data_directory() function */ object_sissi->image = dia_image_load(dia_get_data_directory(object_sissi->file)); object_sissi_update_data(object_sissi, ANCHOR_MIDDLE, ANCHOR_MIDDLE); return &object_sissi->element.object; } This bug was found using cppcheck: http://cppcheck.wiki.sourceforge.net/
Fixed by a patch in bug 565720.
2009-01-02 Hans Breuer <hans@breuer.org> Patch from Sameer D. Sahasrabuddhe fixing bug #565720 En passant fixing bug #564799 and bug #564916 * objects/SISSI/sissi.[ch] : introduced a new local function that returns the correct sheets directory for SISSI * objects/SISSI/site.c objects/SISSI/faraday.c objects/SISSI/area.c objects/SISSI/room.c objects/SISSI/sissi_object.c : use it * sheets/SISSI/*.xml : relative path removed from <sissi:attribute name="file_image"/> * app/create_object.c : don't crash if object creation fails (bug #565567, Sameer D. Sahasrabuddhe)