From 711e0cc90bdd3f0ef9e32e6c0b826f6184483afc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 16 Jun 2010 19:24:54 +0200 Subject: [PATCH] audioiirfilter: Fix possible NULL pointer dereference --- gst/audiofx/audioiirfilter.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gst/audiofx/audioiirfilter.c b/gst/audiofx/audioiirfilter.c index 1f06312..bac16b2 100644 --- a/gst/audiofx/audioiirfilter.c +++ b/gst/audiofx/audioiirfilter.c @@ -161,19 +161,17 @@ gst_audio_iir_filter_update_coefficients (GstAudioIIRFilter * self, self->b = vb; } - if (self->a && self->a->n_values > 0) + if (self->a && self->a->n_values > 0) { a = g_new (gdouble, self->a->n_values); - if (self->b && self->b->n_values > 0) - b = g_new (gdouble, self->b->n_values); - if (self->a) { for (i = 0; i < self->a->n_values; i++) { GValue *v = g_value_array_get_nth (self->a, i); a[i] = g_value_get_double (v); } } - if (self->b) { + if (self->b && self->b->n_values > 0) { + b = g_new (gdouble, self->b->n_values); for (i = 0; i < self->b->n_values; i++) { GValue *v = g_value_array_get_nth (self->b, i); b[i] = g_value_get_double (v); -- 2.7.4