mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
remove unnecessary allocations
This commit is contained in:
parent
356fdd6073
commit
c0bf51978c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user