From: Diederik van Lierop Date: Wed, 17 Feb 2010 21:45:04 +0000 (+0100) Subject: Fix a memory leak in sp_canvastext X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a468077540ddecad3973e941b5dc36acf05a973;p=inkscape.git Fix a memory leak in sp_canvastext --- diff --git a/src/display/canvas-text.cpp b/src/display/canvas-text.cpp index 1c715291f..d32bc20c3 100644 --- a/src/display/canvas-text.cpp +++ b/src/display/canvas-text.cpp @@ -91,7 +91,9 @@ sp_canvastext_destroy (GtkObject *object) SPCanvasText *canvastext = SP_CANVASTEXT (object); - canvastext->item=NULL; + g_free(canvastext->text); + canvastext->text = NULL; + canvastext->item = NULL; if (GTK_OBJECT_CLASS (parent_class_ct)->destroy) (* GTK_OBJECT_CLASS (parent_class_ct)->destroy) (object);