Commit fb7e2b90 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

gnutls: fix memory leak in error case

(cherry picked from commit 38150d6e9de4d8d382149aa2e174b565958ceef7)
parent 4087c7c0
...@@ -819,7 +819,7 @@ static int OpenServer (vlc_object_t *obj) ...@@ -819,7 +819,7 @@ static int OpenServer (vlc_object_t *obj)
vlc_tls_creds_sys_t *sys = malloc (sizeof (*sys)); vlc_tls_creds_sys_t *sys = malloc (sizeof (*sys));
if (unlikely(sys == NULL)) if (unlikely(sys == NULL))
return VLC_ENOMEM; goto error;
server->sys = sys; server->sys = sys;
server->add_CA = gnutls_ServerAddCA; server->add_CA = gnutls_ServerAddCA;
...@@ -883,6 +883,7 @@ static int OpenServer (vlc_object_t *obj) ...@@ -883,6 +883,7 @@ static int OpenServer (vlc_object_t *obj)
error: error:
free (sys); free (sys);
gnutls_Deinit (obj);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment