diff --git a/gst/rtsp-server/rtsp-server.c b/gst/rtsp-server/rtsp-server.c index fe9657becd..30f7b14d00 100644 --- a/gst/rtsp-server/rtsp-server.c +++ b/gst/rtsp-server/rtsp-server.c @@ -1114,7 +1114,7 @@ default_accept_client (GstRTSPServer * server, GstRTSPClient * client, accept_failed: { gchar *str = gst_rtsp_strresult (res); - *error = g_error_new (GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, + g_set_error (error, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, "Could not accept client on server socket %p: %s", socket, str); GST_ERROR ("Could not accept client on server socket %p: %s", socket, str); g_free (str);