From ed26f772e749ea5e7762595af3dbf13b2698209a Mon Sep 17 00:00:00 2001 From: Divya Laxetti Date: Thu, 27 Jun 2019 15:45:45 +0200 Subject: [PATCH] memory locking without root --- lib/memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/memory.cpp b/lib/memory.cpp index 4bba823d6..f649ef872 100644 --- a/lib/memory.cpp +++ b/lib/memory.cpp @@ -77,7 +77,7 @@ int memory_lock(size_t lock) warning("Failed to in increase ressource limit of locked memory. Please increase manually by running as root:"); warning(" $ ulimit -Hl %zu", lock); - goto out; + return 0; } l.rlim_max = lock; @@ -91,7 +91,7 @@ int memory_lock(size_t lock) debug(LOG_MEM | 2, "Increased ressource limit of locked memory to %zd bytes", lock); } -out: + #endif /* __arm__ */ #ifdef _POSIX_MEMLOCK /* Lock all current and future memory allocations */