[pulseaudio-commits] r1282 - /trunk/src/pulsecore/core.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 18 18:15:49 PDT 2006


Author: lennart
Date: Sat Aug 19 03:15:48 2006
New Revision: 1282

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1282&root=pulseaudio&view=rev
Log:
deal properly with pa_mempool_new() failing

Modified:
    trunk/src/pulsecore/core.c

Modified: trunk/src/pulsecore/core.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/core.c?rev=1282&root=pulseaudio&r1=1281&r2=1282&view=diff
==============================================================================
--- trunk/src/pulsecore/core.c (original)
+++ trunk/src/pulsecore/core.c Sat Aug 19 03:15:48 2006
@@ -46,7 +46,11 @@
 
 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);
 
     c->mainloop = m;
@@ -78,7 +82,7 @@
     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;
 




More information about the pulseaudio-commits mailing list