pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files/add Fix a ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3c66a51e0a70
branches: pkg_install-renovation
changeset: 541539:3c66a51e0a70
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon May 12 14:37:50 2008 +0000
description:
Fix a segfault when no archive was found as the signature cookie is not
valid in that case.
diffstat:
pkgtools/pkg_install/files/add/perform.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r ecda4224e60d -r 3c66a51e0a70 pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Mon May 12 12:46:06 2008 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Mon May 12 14:37:50 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.70.4.2 2008/05/11 20:20:37 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.70.4.3 2008/05/12 14:37:50 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,7 +6,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: perform.c,v 1.70.4.2 2008/05/11 20:20:37 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.70.4.3 2008/05/12 14:37:50 joerg Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -1081,7 +1081,7 @@
if ((pkg->archive = find_archive(pkgpath, &archive_cookie)) == NULL) {
warnx("no pkg found for '%s', sorry.", pkgpath);
- goto clean_memory;
+ goto clean_find_archive;
}
#ifdef HAVE_SSL
if (pkg_verify_signature(&pkg->archive, &pkg->entry, &pkg->pkgname,
@@ -1232,6 +1232,7 @@
#ifdef HAVE_SSL
pkg_free_signature(signature_cookie);
#endif
+clean_find_archive:
free(pkg);
return status;
}
Home |
Main Index |
Thread Index |
Old Index