Commit 7b026679 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>
(cherry picked from commit de8a9544)
parent a937068d
...@@ -880,8 +880,11 @@ static void vlc_object_detach_unlocked (vlc_object_t *p_this) ...@@ -880,8 +880,11 @@ static void vlc_object_detach_unlocked (vlc_object_t *p_this)
if( priv->i_children ) if( priv->i_children )
{ {
priv->pp_children = (vlc_object_t **)realloc( priv->pp_children, vlc_object_t **pp_children = (vlc_object_t **)
realloc( priv->pp_children,
priv->i_children * sizeof(vlc_object_t *) ); priv->i_children * sizeof(vlc_object_t *) );
if( pp_children )
priv->pp_children = pp_children;
} }
else 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