mirror of https://code.videolan.org/videolan/vlc
vlc_input: handle strdup failure
If the string duplication failed, we don't want to return a non-identical seekpoint and should prefer to signal that allocation as a whole failed.
This commit is contained in:
parent
77ed82a520
commit
0e3741a61f
|
@ -77,7 +77,14 @@ static inline seekpoint_t *vlc_seekpoint_Duplicate( const seekpoint_t *src )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (src->psz_name)
|
if (src->psz_name)
|
||||||
|
{
|
||||||
point->psz_name = strdup(src->psz_name);
|
point->psz_name = strdup(src->psz_name);
|
||||||
|
if (point->psz_name == NULL)
|
||||||
|
{
|
||||||
|
vlc_seekpoint_Delete(point);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
point->i_time_offset = src->i_time_offset;
|
point->i_time_offset = src->i_time_offset;
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue