← Commit list

5cc6459c4

Denis Vlasenko
Denis Vlasenko
2007-11-10
FAILED Duration: 13s

Subject

umount: stop using excessive aounts of stack. Surprisingly, code shrank a lot too

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/umount.c+2 -1
@@ -25,7 +25,7 @@ int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int umount_main(int argc, char **argv)
{
int doForce;
- char path[PATH_MAX + 2];
+ char *const path = xmalloc(PATH_MAX + 2); /* to save stack */
struct mntent me;
FILE *fp;
char *fstype = 0;
@@ -155,6 +155,7 @@ int umount_main(int argc, char **argv)
free(mtl);
mtl = m;
}
+ free(path);
}
return status;