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
This commit is contained in:
Lennart Poettering 2004-08-04 16:39:30 +00:00
parent 24291aff27
commit 46091a9237
61 changed files with 700 additions and 631 deletions

View file

@ -28,6 +28,7 @@
#include "protocol-cli.h"
#include "cli.h"
#include "xmalloc.h"
struct pa_protocol_cli {
struct pa_module *module;
@ -59,8 +60,7 @@ struct pa_protocol_cli* pa_protocol_cli_new(struct pa_core *core, struct pa_sock
struct pa_protocol_cli* p;
assert(core && server);
p = malloc(sizeof(struct pa_protocol_cli));
assert(p);
p = pa_xmalloc(sizeof(struct pa_protocol_cli));
p->module = m;
p->core = core;
p->server = server;
@ -81,5 +81,5 @@ void pa_protocol_cli_free(struct pa_protocol_cli *p) {
pa_idxset_free(p->connections, free_connection, NULL);
pa_socket_server_free(p->server);
free(p);
pa_xfree(p);
}