From: Renu Tyagi Date: Tue, 23 Sep 2014 07:04:19 +0000 (+0200) Subject: pcm_file: fixed missing free X-Git-Tag: v1.0.29~37 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d37f9187956cc0a58bdd129a807e3fdd1f5286b8;p=alsa-lib.git pcm_file: fixed missing free Signed-off-by: renu tyagi Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index 5541a939..9ab6964d 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -758,6 +758,7 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name, ifd = open(ifname, O_RDONLY); /* TODO: mind blocking mode */ if (ifd < 0) { SYSERR("open %s for reading failed", ifname); + free(file->fname); free(file); return -errno; } @@ -772,6 +773,7 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name, err = snd_pcm_new(&pcm, SND_PCM_TYPE_FILE, name, slave->stream, slave->mode); if (err < 0) { free(file->fname); + free(file->ifname); free(file); return err; }