summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-07-12 11:34:16 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-07-12 16:21:03 +0000
commit0af49a8fc94c57c71c97909fbb8b7acc403f980a (patch)
treeb565677721c260809628b4d796a03a762067bf0a
parent2f7364a9adc99bf077d3004a696742a7e3cffff4 (diff)
svm: handles heap dlmalloc allocation failure
Type: fix Fixes: 6a5adc3695 Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272 Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r--src/svm/ssvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 605b692e91f..feba7f93496 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -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