]> git.alsa-project.org Git - alsa-tools.git/commitdiff
hdspmixer: fix core dump
authorwynnfeng <wynnfeng@tencent.com>
Sun, 29 Jan 2023 12:47:53 +0000 (20:47 +0800)
committerJaroslav Kysela <perex@perex.cz>
Wed, 3 May 2023 14:45:49 +0000 (16:45 +0200)
Initialize the name pointer to NULL.

Fixes: https://github.com/alsa-project/alsa-tools/pull/14
Signed-off-by: wynnfeng <wynnfeng@tencent.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
hdspmixer/src/hdspmixer.cxx

index 9c0a3c4cb7a00641848249da870ee8274a1fd6bf..a33a75ef2a81f62c5f509b05c3f8eb05101778df 100644 (file)
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
 {
     HDSPMixerWindow *window;
     HDSPMixerCard *hdsp_cards[3];
-    char *name, *shortname;
+    char *name = NULL, *shortname;
     int card;
     int cards = 0;