[rhythmbox] mtp: fix double free of error message in gst sink



commit 30784c1f8269b64d4f71f33c5dfaec0bb5b2a302
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Nov 4 06:39:11 2009 +1000

    mtp: fix double free of error message in gst sink
    
    This fixes the crash reported in bug 600549.

 plugins/mtpdevice/rb-mtp-gst-sink.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/mtpdevice/rb-mtp-gst-sink.c b/plugins/mtpdevice/rb-mtp-gst-sink.c
index e710e20..822256f 100644
--- a/plugins/mtpdevice/rb-mtp-gst-sink.c
+++ b/plugins/mtpdevice/rb-mtp-gst-sink.c
@@ -246,7 +246,7 @@ rb_mtp_sink_handle_message (GstBin *bin, GstMessage *message)
 			gst_element_message_full (GST_ELEMENT (sink),
 						  GST_MESSAGE_ERROR,
 						  GST_RESOURCE_ERROR, code,
-						  sink->upload_error->message, NULL,
+						  g_strdup (sink->upload_error->message), NULL,
 						  __FILE__, GST_FUNCTION, __LINE__);
 		}
 	}
@@ -363,7 +363,6 @@ rb_mtp_sink_finalize (GObject *object)
 	g_mutex_free (sink->upload_mutex);
 	g_cond_free (sink->upload_cond);
 
-	/* probably isn't right */
 	if (sink->upload_error) {
 		g_error_free (sink->upload_error);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]