Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
clenaup: simplify pkg_checksum_free_entry
Baptiste Daroussin committed 4 years ago
commit 7af48336fc8aa2f0436c636c7ce9cc150391d31d
parent 7439bee7dc9dc95c037d34d420b5edb0625651fb
1 file changed +4 -6
modified libpkg/pkg_checksum.c
@@ -158,12 +158,10 @@ static const struct _pkg_cksum_type {
static void
pkg_checksum_free_entry(struct pkg_checksum_entry *e)
{
-
	if (e != NULL) {
-
		if (e->value) {
-
			free(e->value);
-
		}
-
		free(e);
-
	}
+
	if (e == NULL)
+
		return;
+
	free(e->value);
+
	free(e);
}

static void