mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
gnomevfssrc: Fix possible NULL pointer dereference
It's always an error if gst_buffer_try_new_and_alloc() returns NULL
This commit is contained in:
parent
611d87ce7a
commit
9c570dbced
1 changed files with 1 additions and 1 deletions
|
@ -624,7 +624,7 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = gst_buffer_try_new_and_alloc (size);
|
buf = gst_buffer_try_new_and_alloc (size);
|
||||||
if (G_UNLIKELY (buf == NULL && size == 0)) {
|
if (G_UNLIKELY (buf == NULL)) {
|
||||||
GST_ERROR_OBJECT (src, "Failed to allocate %u bytes", size);
|
GST_ERROR_OBJECT (src, "Failed to allocate %u bytes", size);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue