summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-15 14:22:33 +0200
committerTakashi Iwai <tiwai@suse.de>2007-08-15 14:22:33 +0200
commit540c7f765f18b0dcd05f173bd08d952b1d479400 (patch)
treeb107f3b0fe5bd658abf8aac8980948c36c33f7a7
parentb72b817df6d848b7a4d5510a457623fb303c96bd (diff)
Fix use after free
Fixed use after free (ALSA bug#3300).
-rw-r--r--src/confmisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/confmisc.c b/src/confmisc.c
index b0b03019..f2d08e82 100644
--- a/src/confmisc.c
+++ b/src/confmisc.c
@@ -764,9 +764,9 @@ static int parse_card(snd_config_t *root, snd_config_t *src,
return err;
}
card = snd_card_get_index(str);
- free(str);
if (card < 0)
SNDERR("cannot find card '%s'", str);
+ free(str);
return card;
}