summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-09-25 10:18:07 +0900
committerSebastian Dröge <sebastian@centricular.com>2015-09-25 10:14:45 +0200
commitdc0ae9203a6d166124fda57d6a023b2fc57138ae (patch)
tree0c94ee1bb6248dbbbc547c7237ab95ee354d59e9
parent2c60b7eb1fc8851296e7bbb209663bb0c0e53f21 (diff)
downloadgstreamer-dc0ae9203a6d166124fda57d6a023b2fc57138ae.tar.gz
ptpclock: Fix error leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755607
-rw-r--r--libs/gst/net/gstptpclock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gst/net/gstptpclock.c b/libs/gst/net/gstptpclock.c
index 4c489082a0..65319e1a94 100644
--- a/libs/gst/net/gstptpclock.c
+++ b/libs/gst/net/gstptpclock.c
@@ -961,6 +961,7 @@ send_delay_req_timeout (PtpPendingSync * sync)
sizeof (header), &written, &err);
if (status == G_IO_STATUS_ERROR) {
g_warning ("Failed to write to stdout: %s", err->message);
+ g_clear_error (&err);
return G_SOURCE_REMOVE;
} else if (status == G_IO_STATUS_EOF) {
g_message ("EOF on stdout");
@@ -984,6 +985,7 @@ send_delay_req_timeout (PtpPendingSync * sync)
(const gchar *) delay_req, 44, &written, &err);
if (status == G_IO_STATUS_ERROR) {
g_warning ("Failed to write to stdout: %s", err->message);
+ g_clear_error (&err);
g_main_loop_quit (main_loop);
return G_SOURCE_REMOVE;
} else if (status == G_IO_STATUS_EOF) {
@@ -1748,6 +1750,7 @@ have_stdin_data_cb (GIOChannel * channel, GIOCondition condition,
&read, &err);
if (status == G_IO_STATUS_ERROR) {
GST_ERROR ("Failed to read from stdin: %s", err->message);
+ g_clear_error (&err);
g_main_loop_quit (main_loop);
return G_SOURCE_REMOVE;
} else if (status == G_IO_STATUS_EOF) {
@@ -1771,6 +1774,7 @@ have_stdin_data_cb (GIOChannel * channel, GIOCondition condition,
status = g_io_channel_read_chars (channel, buffer, header.size, &read, &err);
if (status == G_IO_STATUS_ERROR) {
GST_ERROR ("Failed to read from stdin: %s", err->message);
+ g_clear_error (&err);
g_main_loop_quit (main_loop);
return G_SOURCE_REMOVE;
} else if (status == G_IO_STATUS_EOF) {