search for: new_dirname

Displaying 2 results from an estimated 2 matches for "new_dirname".

2014 Jul 29
4
[PATCH 0/2] supermin: improve handling of memory
Hi, the two patches improve the way memory is handled in supermin, by cleanly exiting on memory allocation failures, and free'ing memory when not needed (to keep working and not run out of memory). Pino Toscano (2): Check for failures in memory allocations Free memory buffers when not used src/ext2fs-c.c | 13 +++++++++++-- src/init.c | 13 +++++++++++++ 2 files changed, 24
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...directory, then - * we want to look up the target directory. (RHBZ#698089). - */ - struct stat stat1, stat2; - if (lstat (dirname, &stat1) == 0 && S_ISLNK (stat1.st_mode) && - stat (dirname, &stat2) == 0 && S_ISDIR (stat2.st_mode)) { - char *new_dirname = malloc (PATH_MAX+1); - ssize_t r = readlink (dirname, new_dirname, PATH_MAX+1); - if (r == -1) - error (EXIT_FAILURE, errno, "readlink: %s", orig_filename); - new_dirname[r] = '\0'; - dirname = new_dirname; - } - - /* Look up the parent directory...