From: David Goulet Date: Tue, 30 Sep 2014 16:00:31 +0000 (-0400) Subject: Fix: use max between index and nbmem for syscall table realloc X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=4b47b6a9070be168eb81fd204e4490d0f1d3be87;ds=sidebyside Fix: use max between index and nbmem for syscall table realloc Signed-off-by: David Goulet --- 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);