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

access: fix NULL deref on error

parent ed96e803
...@@ -65,10 +65,13 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input, ...@@ -65,10 +65,13 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
return NULL; return NULL;
access_t *access = vlc_custom_create(parent, sizeof (*access), "access"); access_t *access = vlc_custom_create(parent, sizeof (*access), "access");
if (unlikely(access == NULL))
return NULL;
char *scheme = strndup(mrl, p - mrl); char *scheme = strndup(mrl, p - mrl);
char *url = strdup(mrl); char *url = strdup(mrl);
if (unlikely(access == NULL || scheme == NULL || url == NULL)) if (unlikely(scheme == NULL || url == NULL))
{ {
free(url); free(url);
free(scheme); free(scheme);
......
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