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
This commit is contained in:
Vadim Yanitskiy 2018-01-09 00:13:15 +06:00
parent f59f3f1ba8
commit 2254861efb
1 changed files with 1 additions and 0 deletions

View File

@ -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