deal properly with pa_mempool_new() failing

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1282 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-08-19 01:15:48 +00:00
parent 8c9bdb838c
commit 046bdd9b30

View file

@ -46,6 +46,10 @@
pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
pa_core* c;
pa_mempool *pool;
if (!(pool = pa_mempool_new(shared)))
return NULL;
c = pa_xnew(pa_core, 1);
@ -78,7 +82,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
PA_LLIST_HEAD_INIT(pa_subscription_event, c->subscription_event_queue);
c->subscription_event_last = NULL;
c->mempool = pa_mempool_new(shared);
c->mempool = pool;
c->disallow_module_loading = 0;