From 089b8982e9816def693890a96882f370ea287f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 10 Jan 2018 17:10:28 +0100 Subject: [PATCH] tests: test-filter: fix dereference before null check Null-checking op_info suggests that it may be null, but it has already been dereferenced on all paths leading to the check. There may be a null pointer dereference, or else the comparison against null is unnecessary. --- tests/test-filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-filter.c b/tests/test-filter.c index f83068273a..6fdc8b6e95 100644 --- a/tests/test-filter.c +++ b/tests/test-filter.c @@ -152,13 +152,14 @@ error_cleanup: static void dump_operation (GstVaapiFilterOpInfo * op_info) { - GParamSpec *const pspec = op_info->pspec; + GParamSpec *pspec; GValue value = G_VALUE_INIT; gchar *value_str; if (!op_info) return; + pspec = op_info->pspec; g_print (" %s: ", g_param_spec_get_name (pspec)); g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_param_value_set_default (pspec, &value);