diff options
-rw-r--r-- | ports/linux/guts/mkstemp64.c | 1 | ||||
-rw-r--r-- | ports/unix/guts/fts_open.c | 2 | ||||
-rw-r--r-- | ports/unix/guts/mkdtemp.c | 1 | ||||
-rw-r--r-- | ports/unix/guts/mkstemp.c | 1 | ||||
-rw-r--r-- | ports/unix/guts/mktemp.c | 1 | ||||
-rw-r--r-- | pseudo.c | 8 |
6 files changed, 6 insertions, 8 deletions
diff --git a/ports/linux/guts/mkstemp64.c b/ports/linux/guts/mkstemp64.c index 6497f2e..cbeda0e 100644 --- a/ports/linux/guts/mkstemp64.c +++ b/ports/linux/guts/mkstemp64.c @@ -41,7 +41,6 @@ } /* mkstemp only changes the XXXXXX at the end. */ memcpy(template + len - 6, tmp_template + strlen(tmp_template) - 6, 6); - free(tmp_template); /* return rc; * } */ diff --git a/ports/unix/guts/fts_open.c b/ports/unix/guts/fts_open.c index 8b3ce19..964314e 100644 --- a/ports/unix/guts/fts_open.c +++ b/ports/unix/guts/fts_open.c @@ -29,6 +29,8 @@ rpath_argv[i] = PSEUDO_ROOT_PATH(AT_FDCWD, path_argv[i], AT_SYMLINK_NOFOLLOW); if (!rpath_argv[i]) errored = 1; + else + rpath_argv[i] = strdup(rpath_argv[i]); } if (errored) { diff --git a/ports/unix/guts/mkdtemp.c b/ports/unix/guts/mkdtemp.c index 5ef647b..5337661 100644 --- a/ports/unix/guts/mkdtemp.c +++ b/ports/unix/guts/mkdtemp.c @@ -40,7 +40,6 @@ /* mkdtemp only changes the XXXXXX at the end. */ memcpy(template + len - 6, tmp_template + strlen(tmp_template) - 6, 6); rc = template; - free(tmp_template); /* return rc; * } */ diff --git a/ports/unix/guts/mkstemp.c b/ports/unix/guts/mkstemp.c index 1f055fd..315bec8 100644 --- a/ports/unix/guts/mkstemp.c +++ b/ports/unix/guts/mkstemp.c @@ -41,7 +41,6 @@ } /* mkstemp only changes the XXXXXX at the end. */ memcpy(template + len - 6, tmp_template + strlen(tmp_template) - 6, 6); - free(tmp_template); /* return rc; * } */ diff --git a/ports/unix/guts/mktemp.c b/ports/unix/guts/mktemp.c index 7cf594a..a39d1b7 100644 --- a/ports/unix/guts/mktemp.c +++ b/ports/unix/guts/mktemp.c @@ -29,7 +29,6 @@ */ memcpy(template + len - 6, tmp_template + strlen(tmp_template) - 6, 6); rc = template; - free(tmp_template); /* return rc; * } @@ -180,7 +180,7 @@ main(int argc, char *argv[]) { pseudo_diag("Can't resolve path '%s'\n", optarg); usage(EXIT_FAILURE); } - opt_i = s; + opt_i = strdup(s); break; case 'l': /* log */ optptr += snprintf(optptr, pseudo_path_max() - (optptr - opts), @@ -193,7 +193,7 @@ main(int argc, char *argv[]) { pseudo_diag("Can't resolve move-from path '%s'\n", optarg); usage(EXIT_FAILURE); } - opt_m = s; + opt_m = strdup(s); break; case 'M': /* move to... (see also 'm') */ s = PSEUDO_ROOT_PATH(AT_FDCWD, optarg, 0); @@ -201,7 +201,7 @@ main(int argc, char *argv[]) { pseudo_diag("Can't resolve move-to path '%s'\n", optarg); usage(EXIT_FAILURE); } - opt_M = s; + opt_M = strdup(s); break; case 'p': /* passwd file path */ s = PSEUDO_ROOT_PATH(AT_FDCWD, optarg, AT_SYMLINK_NOFOLLOW); @@ -228,7 +228,7 @@ main(int argc, char *argv[]) { } pseudo_set_value("PSEUDO_CHROOT", s); if (o == 'r') - opt_r = s; + opt_r = strdup(s); break; case 'S': /* stop */ opt_S = 1; |