diff options
Diffstat (limited to 'ports')
-rw-r--r-- | ports/common/guts/execv.c | 1 | ||||
-rw-r--r-- | ports/common/guts/execve.c | 1 | ||||
-rw-r--r-- | ports/common/guts/execvp.c | 1 | ||||
-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/linkat.c | 6 | ||||
-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-- | ports/unix/guts/realpath.c | 2 |
10 files changed, 2 insertions, 15 deletions
diff --git a/ports/common/guts/execv.c b/ports/common/guts/execv.c index 3e1f820..d5dc3b0 100644 --- a/ports/common/guts/execv.c +++ b/ports/common/guts/execv.c @@ -15,7 +15,6 @@ if (antimagic == 0) { char *path_guess = pseudo_exec_path(file, 0); pseudo_client_op(OP_EXEC, PSA_EXEC, -1, -1, path_guess, 0); - free(path_guess); } pseudo_setupenv(); diff --git a/ports/common/guts/execve.c b/ports/common/guts/execve.c index ff6a44e..22d07a2 100644 --- a/ports/common/guts/execve.c +++ b/ports/common/guts/execve.c @@ -16,7 +16,6 @@ if (antimagic == 0) { char *path_guess = pseudo_exec_path(file, 0); pseudo_client_op(OP_EXEC, PSA_EXEC, -1, -1, path_guess, 0); - free(path_guess); } new_environ = pseudo_setupenvp(envp); diff --git a/ports/common/guts/execvp.c b/ports/common/guts/execvp.c index 04253c3..b30705d 100644 --- a/ports/common/guts/execvp.c +++ b/ports/common/guts/execvp.c @@ -16,7 +16,6 @@ if (antimagic == 0) { char *path_guess = pseudo_exec_path(file, 1); pseudo_client_op(OP_EXEC, PSA_EXEC, -1, -1, path_guess, 0); - free(path_guess); } pseudo_setupenv(); 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/linkat.c b/ports/unix/guts/linkat.c index 9ca7c47..fe29b39 100644 --- a/ports/unix/guts/linkat.c +++ b/ports/unix/guts/linkat.c @@ -37,8 +37,6 @@ rc = real_link(oldpath, newpath); save_errno = errno; if (rc == -1) { - free(oldpath); - free(newpath); errno = save_errno; return rc; } @@ -53,8 +51,6 @@ if (rc2 == -1) { pseudo_diag("Fatal: Tried to stat '%s' after linking it, but failed: %s.\n", oldpath, strerror(errno)); - free(oldpath); - free(newpath); errno = ENOENT; return rc; } @@ -67,8 +63,6 @@ */ pseudo_client_op(OP_LINK, 0, -1, -1, newpath, &buf); - free(oldpath); - free(newpath); errno = save_errno; /* return rc; 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; * } diff --git a/ports/unix/guts/realpath.c b/ports/unix/guts/realpath.c index 8059f5e..48b2b34 100644 --- a/ports/unix/guts/realpath.c +++ b/ports/unix/guts/realpath.c @@ -13,13 +13,11 @@ return NULL; } if ((len = strlen(rname)) >= pseudo_sys_path_max()) { - free(rname); errno = ENAMETOOLONG; return NULL; } if (resolved_name) { memcpy(resolved_name, rname, len + 1); - free(rname); rc = resolved_name; } else { rc = rname; |