mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm_file: fixed missing free
Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
020bb3018a
commit
d37f918795
1 changed files with 2 additions and 0 deletions
|
|
@ -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 */
|
ifd = open(ifname, O_RDONLY); /* TODO: mind blocking mode */
|
||||||
if (ifd < 0) {
|
if (ifd < 0) {
|
||||||
SYSERR("open %s for reading failed", ifname);
|
SYSERR("open %s for reading failed", ifname);
|
||||||
|
free(file->fname);
|
||||||
free(file);
|
free(file);
|
||||||
return -errno;
|
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);
|
err = snd_pcm_new(&pcm, SND_PCM_TYPE_FILE, name, slave->stream, slave->mode);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
free(file->fname);
|
free(file->fname);
|
||||||
|
free(file->ifname);
|
||||||
free(file);
|
free(file);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue