svm: handles heap dlmalloc allocation failure 26/20626/2
authorBenoît Ganne <bganne@cisco.com>
Fri, 12 Jul 2019 09:34:16 +0000 (11:34 +0200)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 12 Jul 2019 16:21:03 +0000 (16:21 +0000)
Type: fix
Fixes: 6a5adc3695

Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/svm/ssvm.c

index 605b692..feba7f9 100644 (file)
@@ -370,6 +370,12 @@ ssvm_master_init_private (ssvm_private_t * ssvm)
   }
 #else
   heap = create_mspace (rnd_size, 1 /* locked */ );
+  if (heap == 0)
+    {
+      clib_unix_warning ("mheap alloc");
+      return -1;
+    }
+
   mspace_disable_expand (heap);
 #endif