summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-06-29 11:56:01 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-07-03 07:21:22 +0000
commit52dea1f9e3b607985986453622ad84fc05aefde1 (patch)
treeffa7637cb1491ea06c5b11773789e72cbb7bdfeb
parentResync extensions with embed images fix (diff)
downloadinkscape-52dea1f9e3b607985986453622ad84fc05aefde1.tar.gz
inkscape-52dea1f9e3b607985986453622ad84fc05aefde1.zip
Crashfix SIOX Trace (free memory properly)
https://gitlab.com/inkscape/inkscape/issues/293
-rw-r--r--src/trace/siox.cpp3
1 files changed, 1 insertions, 2 deletions
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;
}