aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-04 14:45:35 -0200
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 16:48:19 -0200
commit0bfac896e66548130c763d015ac16347ced95b84 (patch)
tree69f4e3461d248235af36eee8eacea5df4c750f29
parent1804d158ba92fb251a0a6a6f38b0d5082d7c91ae (diff)
pcm: Cleanup control/status when setup fails
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
-rw-r--r--src/pcm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pcm.c b/src/pcm.c
index cec4e47..ac454b0 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -913,6 +913,7 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
return pcm;
fail:
+ pcm_hw_munmap_status(pcm);
if (flags & PCM_MMAP)
munmap(pcm->mmap_buffer, pcm_frames_to_bytes(pcm, pcm->buffer_size));
fail_close: