path: root/tests
diff options
authorVíctor Manuel Jáquez Leal <>2018-01-10 17:10:28 +0100
committerVíctor Manuel Jáquez Leal <>2018-01-10 17:10:28 +0100
commit089b8982e9816def693890a96882f370ea287f47 (patch)
tree36e2aad11ca29417dbf53dbe7293ba32cc369ba0 /tests
parent66794c9bc9b2a834764d0e139e594badb305875b (diff)
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.
Diffstat (limited to 'tests')
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-filter.c b/tests/test-filter.c
index f8306827..6fdc8b6e 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)
+ 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);