vhost-user: fix crash in vhost_user_intfc_tx (VPP-519)
[vpp.git] / vppinfra / vppinfra / vec.c
index f711679..2d7ae1d 100644 (file)
@@ -56,9 +56,8 @@ vec_resize_allocate_memory (void *v,
 
   if (!v)
     {
-      new =
-       clib_mem_alloc_aligned_at_offset (data_bytes, data_align,
-                                         header_bytes);
+      new = clib_mem_alloc_aligned_at_offset (data_bytes, data_align, header_bytes, 1  /* yes, call os_out_of_memory */
+       );
       data_bytes = clib_mem_size (new);
       memset (new, 0, data_bytes);
       v = new + header_bytes;
@@ -84,7 +83,8 @@ vec_resize_allocate_memory (void *v,
 
   new =
     clib_mem_alloc_aligned_at_offset (new_alloc_bytes, data_align,
-                                     header_bytes);
+                                     header_bytes,
+                                     1 /* yes, call os_out_of_memory */ );
 
   /* FIXME fail gracefully. */
   if (!new)