]> git.alsa-project.org Git - alsa-tools.git/commitdiff
hdspmixer - small memory leak fix
authorTakashi Iwai <tiwai@suse.de>
Tue, 29 Jan 2008 12:22:33 +0000 (13:22 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 Jan 2008 12:22:33 +0000 (13:22 +0100)
ALSA bug#3687
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3687

the hdspmixer application leaks one memory block, a c-style string
which is obtained by snd_card_get_longname, but never freed ...

hdspmixer/src/hdspmixer.cxx

index 93a0b6404287d0b6748330d04fb7055bede59c31..dfb13ea91f63ac45843d461f07575fa1e8c03cea 100644 (file)
@@ -72,6 +72,7 @@ int main(int argc, char **argv)
            } 
        }
     }
+    free(name);
     if (!cards) {
        printf("No Hammerfall DSP card found.\n");
        exit(EXIT_FAILURE);