From d071ea714d68b306f05ebb2629f2de5fde9684a9 Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Wed, 25 Jan 2023 09:10:57 -0500 Subject: [PATCH] vp9parser: remove checks for g_new0 result The g_new0 aborts the process if it fails. Thus, there is no need to check if the g_new0 call succeeded. This should silence a resource leak warning by static scan. Part-of: --- .../gst-libs/gst/codecparsers/gstvp9parser.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c index 1452210457..712a8b178b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c @@ -632,20 +632,12 @@ GstVp9Parser * gst_vp9_parser_new (void) { GstVp9Parser *parser; - GstVp9ParserPrivate *priv; INITIALIZE_DEBUG_CATEGORY; GST_DEBUG ("Create VP9 Parser"); parser = g_new0 (GstVp9Parser, 1); - if (!parser) - return NULL; - - priv = g_new0 (GstVp9ParserPrivate, 1); - if (!priv) - return NULL; - - parser->priv = priv; + parser->priv = g_new0 (GstVp9ParserPrivate, 1); parser->subsampling_x = parser->subsampling_y = -1; return parser;