mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
auth: fix memleak and add some docs
Fix a memleak of the basic auth token. Add docs for the helper function
This commit is contained in:
parent
c59d9e2970
commit
9f52f281ba
1 changed files with 11 additions and 0 deletions
|
@ -80,6 +80,7 @@ gst_rtsp_auth_finalize (GObject * obj)
|
||||||
GstRTSPAuth *auth = GST_RTSP_AUTH (obj);
|
GstRTSPAuth *auth = GST_RTSP_AUTH (obj);
|
||||||
|
|
||||||
GST_INFO ("finalize auth %p", auth);
|
GST_INFO ("finalize auth %p", auth);
|
||||||
|
g_free (auth->basic);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gst_rtsp_auth_parent_class)->finalize (obj);
|
G_OBJECT_CLASS (gst_rtsp_auth_parent_class)->finalize (obj);
|
||||||
}
|
}
|
||||||
|
@ -253,6 +254,16 @@ gst_rtsp_auth_check_method (GstRTSPAuth * auth, GstRTSPMethod method,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_rtsp_auth_make_basic:
|
||||||
|
* @user: a userid
|
||||||
|
* @pass: a password
|
||||||
|
*
|
||||||
|
* Construct a Basic authorisation token from @user and @pass.
|
||||||
|
*
|
||||||
|
* Returns: the base64 encoding of the string @user:@pass. g_free()
|
||||||
|
* after usage.
|
||||||
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass)
|
gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue