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/socket-client.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/socket-client.c')
-rw-r--r-- | polyp/socket-client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/polyp/socket-client.c b/polyp/socket-client.c index a2187e6a..c0c355de 100644 --- a/polyp/socket-client.c +++ b/polyp/socket-client.c @@ -36,6 +36,7 @@ #include "socket-client.h" #include "socket-util.h" #include "util.h" +#include "xmalloc.h" struct pa_socket_client { struct pa_mainloop_api *mainloop; @@ -50,8 +51,7 @@ static struct pa_socket_client*pa_socket_client_new(struct pa_mainloop_api *m) { struct pa_socket_client *c; assert(m); - c = malloc(sizeof(struct pa_socket_client)); - assert(c); + c = pa_xmalloc(sizeof(struct pa_socket_client)); c->mainloop = m; c->fd = -1; c->io_source = c->fixed_source = NULL; @@ -226,7 +226,7 @@ void pa_socket_client_free(struct pa_socket_client *c) { c->mainloop->cancel_fixed(c->mainloop, c->fixed_source); if (c->fd >= 0) close(c->fd); - free(c); + pa_xfree(c); } void pa_socket_client_set_callback(struct pa_socket_client *c, void (*on_connection)(struct pa_socket_client *c, struct pa_iochannel*io, void *userdata), void *userdata) { |