Fix: use max between index and nbmem for syscall table realloc
[lttng-tools.git] / src / bin / lttng-sessiond / syscall.c
index 95d30d07459dc98d12dfb2ca680f1773cdac7c52..ee7578051e2a12d3322cb6e3d9fd4ae2946da1a7 100644 (file)
@@ -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);
This page took 0.025755 seconds and 5 git commands to generate.