mirror of https://gerrit.osmocom.org/gapk
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:
parent
f59f3f1ba8
commit
2254861efb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue