diff options
author | Renu Tyagi <renu.tyagi@samsung.com> | 2014-09-23 09:04:19 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-23 09:04:19 +0200 |
commit | d37f9187956cc0a58bdd129a807e3fdd1f5286b8 (patch) | |
tree | 5fdcce9dca478e1538e6f9fe3a9fa05db414da6e | |
parent | 020bb3018ad6febbb0ae9650c4a4ca2b016f7d52 (diff) | |
download | alsa-lib-d37f9187956cc0a58bdd129a807e3fdd1f5286b8.tar.gz |
pcm_file: fixed missing free
Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | src/pcm/pcm_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |