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

Don't overwrite the LibVLC structure lock with memset()

parent e834f5fc
......@@ -141,6 +141,7 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
obj->psz_header = NULL;
obj->b_die = false;
obj->b_force = false;
memset (obj + 1, 0, length - sizeof (*obj)); /* type-specific stuff */
if (likely(parent != NULL))
{
......@@ -179,7 +180,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
vlc_restorecancel (canc);
}
memset (obj + 1, 0, length - sizeof (*obj));
return obj;
}
......
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