audiosink, multisocketsink: Fix error leak during failures
authorVineeth T M <vineeth.tm@samsung.com>
Thu, 17 Sep 2015 05:27:33 +0000 (14:27 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 17 Sep 2015 09:59:35 +0000 (11:59 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=755143

gst-libs/gst/audio/gstaudiosink.c
gst/tcp/gstmultisocketsink.c

index 0604f5916126b24e6c431a219ad2c4c606ab63d3..ca2cedafaffca679333a1b1b48202b2b9bdbb8ee 100644 (file)
@@ -480,6 +480,7 @@ thread_failed:
       GST_ERROR_OBJECT (sink, "could not create thread %s", error->message);
     else
       GST_ERROR_OBJECT (sink, "could not create thread for unknown reason");
+    g_clear_error (&error);
     return FALSE;
   }
 }
index bc4e231422aaf3ea81b184dffadc6b272b7b34cc..d8e587b9edba258d1ea26cc8bf2bd7e4fef5eeb7 100644 (file)
@@ -854,6 +854,7 @@ gst_multi_socket_sink_handle_client_write (GstMultiSocketSink * sink,
           GST_LOG_OBJECT (sink, "write would block %p",
               mhclient->handle.socket);
           more = FALSE;
+          g_clear_error (&err);
         } else {
           goto write_error;
         }