Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fixes.
Vsevolod Stakhov committed 11 years ago
commit eb409a021afe32fdfaf285c062eb9dc7b5047fd5
parent 2e89913
2 files changed +2 -8
modified libpkg/pkg_repo.c
@@ -74,7 +74,6 @@ pkg_repo_fetch_remote_tmp(struct pkg_repo *repo,
	char url[MAXPATHLEN];
	char tmp[MAXPATHLEN];
	int fd;
-
	mode_t mask;
	const char *tmpdir, *dot;

	/*
@@ -700,7 +699,6 @@ pkg_repo_fetch_remote_extract_tmp(struct pkg_repo *repo, const char *filename,
		time_t *t, int *rc)
{
	int fd, dest_fd;
-
	mode_t mask;
	FILE *res = NULL;
	const char *tmpdir;
	char tmp[MAXPATHLEN];
@@ -716,9 +714,7 @@ pkg_repo_fetch_remote_extract_tmp(struct pkg_repo *repo, const char *filename,
		tmpdir = "/tmp";
	snprintf(tmp, sizeof(tmp), "%s/%s.XXXXXX", tmpdir, filename);

-
	mask = umask(022);
	dest_fd = mkstemp(tmp);
-
	umask(mask);
	if (dest_fd == -1) {
		pkg_emit_error("Could not create temporary file %s, "
				"aborting update.\n", tmp);
modified libpkg/repo/binary/fetch.c
@@ -245,8 +245,6 @@ checksum:
	}

cleanup:
-
	/* allowed even if dir is NULL */
-
	free(dir);

	if (retcode != EPKG_OK)
		unlink(dest);
@@ -254,8 +252,8 @@ cleanup:
		(void)pkg_repo_binary_create_symlink(pkg, dest, path);
	}

-
	if (path != NULL)
-
		free(path);
+
	/* allowed even if dir is NULL */
+
	free(dir);

	return (retcode);
}