From 52dea1f9e3b607985986453622ad84fc05aefde1 Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Sat, 29 Jun 2019 21:56:01 +1000 Subject: Crashfix SIOX Trace (free memory properly) https://gitlab.com/inkscape/inkscape/issues/293 --- src/trace/siox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/trace/siox.cpp') diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp index f3bf50f55..12d7c20a8 100644 --- a/src/trace/siox.cpp +++ b/src/trace/siox.cpp @@ -656,7 +656,7 @@ GdkPixbuf *SioxImage::getGdkPixbuf() GdkPixbuf *buf = gdk_pixbuf_new_from_data(pixdata, GDK_COLORSPACE_RGB, has_alpha, 8, width, height, - rowstride, nullptr, nullptr); + rowstride, (GdkPixbufDestroyNotify)free, nullptr); //### Fill in the cells with RGB values int row = 0; @@ -677,7 +677,6 @@ GdkPixbuf *SioxImage::getGdkPixbuf() } row += rowstride; } - free(pixdata); return buf; } -- cgit v1.2.3