From 8ea28928d4b381dd445b4410b7960fadd49bec6b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 19 Dec 2009 20:42:18 -0800 Subject: [PATCH] fmlib: Fix uninitialized data in tuner_open(). This is necessary to make fm and fmscan work other than in "test" mode (for the testsuite). --- fmlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fmlib.c b/fmlib.c index 7cc56bd..669cab3 100644 --- a/fmlib.c +++ b/fmlib.c @@ -70,6 +70,8 @@ xmalloc(size_t n) void tuner_open(struct tuner *tuner, const char *device, int index) { + memset(tuner, 0, sizeof *tuner); + if (!device) device = "/dev/radio0"; else if (!strcmp(device, "test") || !strncmp(device, "test ", 5)) { -- 2.11.4.GIT