Commit c0bf5197 authored by Brian Wellington's avatar Brian Wellington
Browse files

remove unnecessary allocations

parent 356fdd60
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.39 2000/09/12 10:07:46 bwelling Exp $ */
/* $Id: dnssec-keygen.c,v 1.40 2000/09/12 11:50:44 bwelling Exp $ */
#include <config.h>
......@@ -171,8 +171,6 @@ main(int argc, char **argv) {
break;
case 'r':
randomfile = isc_commandline_argument;
if (randomfile == NULL)
fatal("out of memory");
break;
case 'v':
endp = NULL;
......@@ -191,8 +189,6 @@ main(int argc, char **argv) {
}
setup_entropy(mctx, randomfile, &ectx);
if (randomfile != NULL)
isc_mem_free(mctx, randomfile);
ret = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.39 2000/09/12 10:07:47 bwelling Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.40 2000/09/12 11:50:45 bwelling Exp $ */
#include <config.h>
......@@ -144,10 +144,7 @@ main(int argc, char *argv[]) {
break;
case 'r':
randomfile = isc_mem_strdup(mctx,
isc_commandline_argument);
if (randomfile == NULL)
fatal("out of memory");
randomfile = isc_commandline_argument;
break;
case 'v':
......@@ -175,8 +172,6 @@ main(int argc, char *argv[]) {
usage();
setup_entropy(mctx, randomfile, &ectx);
if (randomfile != NULL)
isc_mem_free(mctx, randomfile);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.35 2000/09/12 10:07:48 bwelling Exp $ */
/* $Id: dnssec-signkey.c,v 1.36 2000/09/12 11:50:46 bwelling Exp $ */
#include <config.h>
......@@ -195,10 +195,7 @@ main(int argc, char *argv[]) {
break;
case 'r':
randomfile = isc_mem_strdup(mctx,
isc_commandline_argument);
if (randomfile == NULL)
fatal("out of memory");
randomfile = isc_commandline_argument;
break;
case 'v':
......@@ -231,8 +228,6 @@ main(int argc, char *argv[]) {
rdclass = dns_rdataclass_in;
setup_entropy(mctx, randomfile, &ectx);
if (randomfile != NULL)
isc_mem_free(mctx, randomfile);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment