Fix memory leak during build process (Bug 2183)
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Mon, 12 Mar 2018 22:53:13 +0000 (23:53 +0100)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Mon, 12 Mar 2018 22:53:13 +0000 (23:53 +0100)
(Normally we don't care about leaks in short lived processes we use
during build time. But as -fsanitize=address breaks the build in an
early stage, the leak is fixed now.)

Thanks to Andrew Aitchison.

src/src/buildconfig.c

index 804c48c6729eabb4894c7e15825e2b2313c11d57..310798fdd30e897f055e596be02db7de44c66fd6 100644 (file)
@@ -733,6 +733,7 @@ else if (isgroup)
       fprintf(new, "#define FIXED_NEVER_USERS     %d", j);
       for (i = 0; i < j; i++) fprintf(new, ", %d", (unsigned int)vector[i]);
       fprintf(new, "\n");
+      free(vector);
       }
     continue;
     }