diff options
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/linux/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index 121bf9473f0..15c5735d841 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -491,6 +491,7 @@ clib_mem_vm_map_internal (void *base, clib_mem_page_sz_t log2_page_sz, CLIB_MEM_UNPOISON (hdr, sys_page_sz); hdr->next = 0; hdr->prev = mm->last_map; + snprintf (hdr->name, CLIB_VM_MAP_HDR_NAME_MAX_LEN - 1, "%s", (char *) name); mm->last_map = hdr; map_unlock (); @@ -499,7 +500,6 @@ clib_mem_vm_map_internal (void *base, clib_mem_page_sz_t log2_page_sz, hdr->log2_page_sz = log2_page_sz; hdr->num_pages = size >> log2_page_sz; hdr->fd = fd; - snprintf (hdr->name, CLIB_VM_MAP_HDR_NAME_MAX_LEN - 1, "%s", (char *) name); hdr->name[CLIB_VM_MAP_HDR_NAME_MAX_LEN - 1] = 0; mprotect (hdr, sys_page_sz, PROT_NONE); |