From 4b47b6a9070be168eb81fd204e4490d0f1d3be87 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 30 Sep 2014 12:00:31 -0400 Subject: [PATCH] Fix: use max between index and nbmem for syscall table realloc Signed-off-by: David Goulet --- src/bin/lttng-sessiond/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/syscall.c b/src/bin/lttng-sessiond/syscall.c index 95d30d074..ee7578051 100644 --- a/src/bin/lttng-sessiond/syscall.c +++ b/src/bin/lttng-sessiond/syscall.c @@ -81,7 +81,7 @@ int syscall_init_table(void) size_t new_nbmem; /* Double memory size. */ - new_nbmem = index << 1; + new_nbmem = max(index, nbmem << 1); DBG("Reallocating syscall table from %zu to %zu entries", nbmem, new_nbmem); -- 2.34.1