diff options
author | dougb <dougb@FreeBSD.org> | 2012-04-05 04:29:35 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2012-04-05 04:29:35 +0000 |
commit | 0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7 (patch) | |
tree | cf3176c0801c94a4f298353cc450f10cf1aae9c0 /contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c | |
parent | cc55f4943b841b3772901d62a327ad4f9edb2c95 (diff) | |
download | FreeBSD-src-0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7.zip FreeBSD-src-0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7.tar.gz |
Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes.
Diffstat (limited to 'contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c')
-rw-r--r-- | contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c index 1323ed7..6a07146 100644 --- a/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c +++ b/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keyfromlabel.c,v 1.32.14.2 2011-03-12 04:59:14 tbox Exp $ */ +/* $Id: dnssec-keyfromlabel.c,v 1.32.14.4 2011/11/30 00:51:38 marka Exp $ */ /*! \file */ @@ -110,7 +110,8 @@ usage(void) { int main(int argc, char **argv) { - char *algname = NULL, *nametype = NULL, *type = NULL; + char *algname = NULL, *freeit = NULL; + char *nametype = NULL, *type = NULL; const char *directory = NULL; #ifdef USE_PKCS11 const char *engine = "pkcs11"; @@ -342,6 +343,9 @@ main(int argc, char **argv) { algname = strdup(DEFAULT_NSEC3_ALGORITHM); else algname = strdup(DEFAULT_ALGORITHM); + if (algname == NULL) + fatal("strdup failed"); + freeit = algname; if (verbose > 0) fprintf(stderr, "no algorithm specified; " "defaulting to %s\n", algname); @@ -514,8 +518,7 @@ main(int argc, char **argv) { * is a risk of ID collision due to this key or another key * being revoked. */ - if (key_collision(dst_key_id(key), name, directory, alg, mctx, &exact)) - { + if (key_collision(key, name, directory, mctx, &exact)) { isc_buffer_clear(&buf); ret = dst_key_buildfilename(key, 0, directory, &buf); if (ret != ISC_R_SUCCESS) @@ -560,5 +563,8 @@ main(int argc, char **argv) { isc_mem_free(mctx, label); isc_mem_destroy(&mctx); + if (freeit != NULL) + free(freeit); + return (0); } |