diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-04 16:39:30 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-04 16:39:30 +0000 |
commit | 46091a9237f17f4295dca7140d8d70b4fce8b357 (patch) | |
tree | 1c600cd6e1801586abfb66d767f2cd96e15c819c /polyp/iochannel.c | |
parent | 24291aff27c671c11619684cb10d3b36fdf87c0d (diff) |
introduce pa_xmalloc() and friends
implement module auto loading
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@103 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/iochannel.c')
-rw-r--r-- | polyp/iochannel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/polyp/iochannel.c b/polyp/iochannel.c index 69d381f4..77f8fb08 100644 --- a/polyp/iochannel.c +++ b/polyp/iochannel.c @@ -31,6 +31,7 @@ #include "iochannel.h" #include "util.h" #include "socket-util.h" +#include "xmalloc.h" struct pa_iochannel { int ifd, ofd; @@ -103,7 +104,7 @@ struct pa_iochannel* pa_iochannel_new(struct pa_mainloop_api*m, int ifd, int ofd struct pa_iochannel *io; assert(m && (ifd >= 0 || ofd >= 0)); - io = malloc(sizeof(struct pa_iochannel)); + io = pa_xmalloc(sizeof(struct pa_iochannel)); io->ifd = ifd; io->ofd = ofd; io->mainloop = m; @@ -152,7 +153,7 @@ void pa_iochannel_free(struct pa_iochannel*io) { if (io->output_source && (io->output_source != io->input_source)) io->mainloop->cancel_io(io->mainloop, io->output_source); - free(io); + pa_xfree(io); } int pa_iochannel_is_readable(struct pa_iochannel*io) { |