From 9c570dbced9e2ad381eefdc720cdb1b852065e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 Jun 2010 11:08:10 +0200 Subject: [PATCH] gnomevfssrc: Fix possible NULL pointer dereference It's always an error if gst_buffer_try_new_and_alloc() returns NULL --- ext/gnomevfs/gstgnomevfssrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 83de38aa8e..5b27c2ca66 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -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; }