[igt-dev] [PATCH i-g-t] lib/igt_audio: fix uninitialized variable
Simon Ser
simon.ser at intel.com
Thu May 23 10:49:08 UTC 2019
Seems like I'm not used to the C89 style yet, and ASan caught it but with a
completely unrelated stack trace.
Signed-off-by: Simon Ser <simon.ser at intel.com>
---
lib/igt_audio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/igt_audio.c b/lib/igt_audio.c
index 07935e660c5a..376e04ba6ed6 100644
--- a/lib/igt_audio.c
+++ b/lib/igt_audio.c
@@ -205,6 +205,7 @@ static size_t audio_signal_count_freqs(struct audio_signal *signal, int channel)
size_t n, i;
struct audio_signal_freq *freq;
+ n = 0;
for (i = 0; i < signal->freqs_count; i++) {
freq = &signal->freqs[i];
if (freq->channel < 0 || freq->channel == channel)
--
2.21.0
More information about the igt-dev
mailing list