Commit de8a9544 authored by Justus Piater's avatar Justus Piater Committed by Rémi Denis-Courmont

correctly handle realloc() failure

Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent 8ff0cd04
......@@ -803,8 +803,11 @@ static void vlc_object_detach_unlocked (vlc_object_t *p_this)
if( priv->i_children )
{
priv->pp_children = (vlc_object_t **)realloc( priv->pp_children,
priv->i_children * sizeof(vlc_object_t *) );
vlc_object_t **pp_children = (vlc_object_t **)
realloc( priv->pp_children,
priv->i_children * sizeof(vlc_object_t *) );
if( pp_children )
priv->pp_children = pp_children;
}
else
{
......
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