From: Andre Noll Date: Wed, 17 May 2023 20:13:55 +0000 (+0200) Subject: audiod: Fix error checking in init_default_filters(). X-Git-Tag: v0.7.3~15^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=068b2514407313f3a9291acdd265d94b26359d55;p=paraslash.git audiod: Fix error checking in init_default_filters(). We ignore the return value of add_filter() instead of assigning it to ret as usual, then test ret anyway. That's clearly bogus, even more so since with the old code ret can never be negative at this point, so the subsequent condition for the subsequent jump to out: is never true. This bug was introduced 13 years ago. Fixes: 081ea8699e6a309c44446884b8c3752529d96a25 --- diff --git a/audiod.c b/audiod.c index 88599c3f..2b2b7287 100644 --- a/audiod.c +++ b/audiod.c @@ -945,7 +945,7 @@ static int init_default_filters(void) */ if (strcmp(name, "udp") == 0 || strcmp(name, "dccp") == 0) { tmp = para_strdup("fecdec"); - add_filter(i, tmp); + ret = add_filter(i, tmp); free(tmp); if (ret < 0) goto out;