rtpsink: Fix error handling on bad DNS
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Sat, 11 Jul 2020 19:21:33 +0000 (15:21 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 14 Jul 2020 20:48:04 +0000 (20:48 +0000)
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>

gst/rtp/gstrtpsink.c

index 49e357b..364b688 100644 (file)
@@ -506,10 +506,8 @@ gst_rtp_sink_start (GstRtpSink * self)
 
 dns_resolve_failed:
   GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND,
-      ("Could not resolve hostname '%s'", GST_STR_NULL (remote_addr)),
+      ("Could not resolve hostname '%s'", gst_uri_get_host (self->uri)),
       ("DNS resolver reported: %s", error->message));
-  g_free (remote_addr);
-  g_object_unref (iaddr);
   g_error_free (error);
   return FALSE;
 }