summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-01-09 00:13:15 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2018-01-09 00:13:18 +0600
commit2254861efb0216b55d04926b339220ecf9e31aa5 (patch)
treefee07319a835e01d69f4b9122e5b1b9be36f8782
parentf59f3f1ba8bc1cdf7c406867e3611f810ddc28c7 (diff)
pq_alsa.c: fix memory leak after pq_cb_alsa_exit()
Abusing the talloc hierarchical nature may cause some problems, e.g. on embedded systems with emulated talloc API. Let's release the memory allocated for a state explicitly. Change-Id: Ie675a92b1e52a4886dc447af19f65ff5e12a4c40
-rw-r--r--src/pq_alsa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pq_alsa.c b/src/pq_alsa.c
index 84d2e20..676e8e7 100644
--- a/src/pq_alsa.c
+++ b/src/pq_alsa.c
@@ -81,6 +81,7 @@ pq_cb_alsa_exit(void *_state)
{
struct pq_state_alsa *state = _state;
snd_pcm_close(state->pcm_handle);
+ talloc_free(state);
}
static int