Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
C is a dangerous language.
Vsevolod Stakhov committed 11 years ago
commit f2a40a36e0e71b54d1f571efb54364c2972f03e4
parent 7431c05
1 file changed +4 -1
modified libpkg/pkg_repo.c
@@ -138,7 +138,7 @@ pkg_repo_fetch_package(struct pkg *pkg)
		goto checksum;

	/* Create the dirs in cachedir */
-
	if ((path = dirname(dest)) == NULL) {
+
	if ((path = strdup(dirname(dest))) == NULL) {
		pkg_emit_errno("dirname", dest);
		retcode = EPKG_FATAL;
		goto cleanup;
@@ -217,6 +217,9 @@ pkg_repo_fetch_package(struct pkg *pkg)
			pkg_emit_errno("symlink", link_dest);
	}

+
	if (path != NULL)
+
		free(path);
+

	return (retcode);
}