diff options
Diffstat (limited to 'bin/dnssec/dnssec-settime.c')
| -rw-r--r-- | bin/dnssec/dnssec-settime.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/dnssec/dnssec-settime.c b/bin/dnssec/dnssec-settime.c index 3d18b61a6139..e26356c788b1 100644 --- a/bin/dnssec/dnssec-settime.c +++ b/bin/dnssec/dnssec-settime.c @@ -108,8 +108,8 @@ printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch, } else if (epoch) { fprintf(stream, "%d\n", (int) when); } else { - time_t time = when; - output = ctime(&time); + time_t timet = when; + output = ctime(&timet); fprintf(stream, "%s", output); } } @@ -399,7 +399,6 @@ main(int argc, char **argv) { "inactive.\n", program); changed = setpub = setact = ISC_TRUE; - dst_key_free(&prevkey); } else { if (prepub < 0) prepub = 0; @@ -590,6 +589,8 @@ main(int argc, char **argv) { printf("%s\n", newname); } + if (prevkey != NULL) + dst_key_free(&prevkey); dst_key_free(&key); dst_lib_destroy(); isc_hash_destroy(); |
