mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
Fix some memory leaking
This commit is contained in:
parent
e752caca80
commit
0e817579ee
1 changed files with 13 additions and 3 deletions
|
|
@ -94,9 +94,9 @@ struct userdata {
|
||||||
pa_memchunk memchunk;
|
pa_memchunk memchunk;
|
||||||
pa_mempool *mempool;
|
pa_mempool *mempool;
|
||||||
|
|
||||||
const char *name;
|
char *name;
|
||||||
const char *addr;
|
char *addr;
|
||||||
const char *profile;
|
char *profile;
|
||||||
int rate;
|
int rate;
|
||||||
int channels;
|
int channels;
|
||||||
pa_sample_spec ss;
|
pa_sample_spec ss;
|
||||||
|
|
@ -994,10 +994,20 @@ void pa__done(pa_module *m) {
|
||||||
|
|
||||||
if (u->memchunk.memblock)
|
if (u->memchunk.memblock)
|
||||||
pa_memblock_unref(u->memchunk.memblock);
|
pa_memblock_unref(u->memchunk.memblock);
|
||||||
|
/* TODO: free mempool */
|
||||||
|
|
||||||
if (u->smoother)
|
if (u->smoother)
|
||||||
pa_smoother_free(u->smoother);
|
pa_smoother_free(u->smoother);
|
||||||
|
|
||||||
|
if (u->name)
|
||||||
|
pa_xfree(u->name);
|
||||||
|
|
||||||
|
if (u->addr)
|
||||||
|
pa_xfree(u->addr);
|
||||||
|
|
||||||
|
if (u->profile)
|
||||||
|
pa_xfree(u->profile);
|
||||||
|
|
||||||
if (u->stream_fd >= 0)
|
if (u->stream_fd >= 0)
|
||||||
pa_close(u->stream_fd);
|
pa_close(u->stream_fd);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue