[PATCH 1/2] winegstreamer: Remove redundant null check before g_error_free.

Alex Henrie alexhenrie24 at gmail.com
Thu Nov 17 09:46:37 CST 2016


Cc: Andrew Eikum <aeikum at codeweavers.com>

The first thing that g_error_free does is check the pointer:
https://github.com/GNOME/glib/blob/master/glib/gerror.c#L480

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/winegstreamer/gstdemux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index e954e61..67690a3 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1088,8 +1088,7 @@ static GstBusSyncReply watch_bus(GstBus *bus, GstMessage *msg, gpointer data)
         WARN("%s: %s\n", GST_OBJECT_NAME(msg->src), err->message);
         WARN("%s\n", dbg_info);
     }
-    if (err)
-        g_error_free(err);
+    g_error_free(err);
     g_free(dbg_info);
     return GST_BUS_DROP;
 }
-- 
2.10.2




More information about the wine-patches mailing list