alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 02/11] pcm_file : fixed missing free
@ 2014-09-23  4:18 Renu Tyagi
  0 siblings, 0 replies; only message in thread
From: Renu Tyagi @ 2014-09-23  4:18 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai

Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
---
 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 a0b8bf4..f6d222f 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;
        }
--
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-23  4:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23  4:18 [PATCH v2 02/11] pcm_file : fixed missing free Renu Tyagi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).