about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index a0029596..d1d686b1 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1337,7 +1337,7 @@ void grabNCpu() {
         nCPU = 0;
         int bogo = 0;
         size_t len = 500;
-        char* line = alloca(len);
+        char* line = malloc(len);
         while ((dummy = getline(&line, &len, f)) != -1) {
             if(!strncmp(line, "processor\t", strlen("processor\t")))
                 ++nCPU;
@@ -1350,6 +1350,7 @@ void grabNCpu() {
                 }
             }
         }
+        free(line);
         fclose(f);
         if(!nCPU) nCPU=1;
     }