From f4e9de8e5b3a5776d9cefdc9de4e39e9a15fd6f5 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 19 Apr 2010 12:30:19 +0000 Subject: [PATCH] Free the error messages properly, since they aren't owned by gstreamer. Thanks john :) --- src/engines/gstenginepipeline.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index 7cca4531a..6f6ee4363 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -203,8 +203,12 @@ void GstEnginePipeline::ErrorMessageReceived(GstMessage* msg) { gchar* debugs; gst_message_parse_error(msg, &error, &debugs); + QString message(error->message); - emit Error(QString::fromAscii(error->message)); + g_error_free(error); + free(debugs); + + emit Error(message); } void GstEnginePipeline::TagMessageReceived(GstMessage* msg) {