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

cli: drop item if option alloc fails

parent 3fdddb9a
......@@ -383,9 +383,13 @@ static void PlaylistAddCommon(intf_thread_t *intf, const char *const *args,
*/
while (i < n_args && args[i][0] == ':')
{
if (likely(item != NULL))
input_item_AddOption(item, args[i] + 1,
VLC_INPUT_OPTION_TRUSTED);
if (likely(item != NULL)
&& input_item_AddOption(item, args[i] + 1,
VLC_INPUT_OPTION_TRUSTED))
{
input_item_Release(item);
item = NULL;
}
i++;
}
......
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