Commit 42ffd37e authored by Brian Wellington's avatar Brian Wellington
Browse files

remove unnecessary memory allocations

parent 42848e71
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-makekeyset.c,v 1.36 2000/09/08 08:38:55 bwelling Exp $ */ /* $Id: dnssec-makekeyset.c,v 1.37 2000/09/08 08:47:29 bwelling Exp $ */
#include <config.h> #include <config.h>
...@@ -129,17 +129,11 @@ main(int argc, char *argv[]) { ...@@ -129,17 +129,11 @@ main(int argc, char *argv[]) {
{ {
switch (ch) { switch (ch) {
case 's': case 's':
startstr = isc_mem_strdup(mctx, startstr = isc_commandline_argument;
isc_commandline_argument);
if (startstr == NULL)
fatal("out of memory");
break; break;
case 'e': case 'e':
endstr = isc_mem_strdup(mctx, endstr = isc_commandline_argument;
isc_commandline_argument);
if (endstr == NULL)
fatal("out of memory");
break; break;
case 't': case 't':
...@@ -192,17 +186,13 @@ main(int argc, char *argv[]) { ...@@ -192,17 +186,13 @@ main(int argc, char *argv[]) {
isc_stdtime_get(&now); isc_stdtime_get(&now);
if (startstr != NULL) { if (startstr != NULL)
starttime = strtotime(startstr, now, now); starttime = strtotime(startstr, now, now);
isc_mem_free(mctx, startstr);
}
else else
starttime = now; starttime = now;
if (endstr != NULL) { if (endstr != NULL)
endtime = strtotime(endstr, now, starttime); endtime = strtotime(endstr, now, starttime);
isc_mem_free(mctx, endstr);
}
else else
endtime = starttime + (30 * 24 * 60 * 60); endtime = starttime + (30 * 24 * 60 * 60);
......
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