shout2: Fix leak on error in start
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 3 Apr 2019 18:13:49 +0000 (14:13 -0400)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Fri, 5 Apr 2019 14:53:09 +0000 (14:53 +0000)
ext/shout2/gstshout2.c

index 3d3f652..9e2d60f 100644 (file)
@@ -522,6 +522,8 @@ set_failed:
   {
     GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
         ("Error setting %s: %s", cur_prop, shout_get_error (sink->conn)));
+    shout_free (sink->conn);
+    sink->conn = NULL;
     return FALSE;
   }
 }