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
@ -624,7 +624,7 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint 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);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user