mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
audioiirfilter: Fix possible NULL pointer dereference
This commit is contained in:
parent
1f545da974
commit
711e0cc90b
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue