diff options
-rw-r--r-- | source3/utils/net_registry_util.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/utils/net_registry_util.c b/source3/utils/net_registry_util.c index 084378f792..22cb3a55b1 100644 --- a/source3/utils/net_registry_util.c +++ b/source3/utils/net_registry_util.c @@ -27,12 +27,20 @@ void print_registry_key(const char *keyname, NTTIME *modtime) { + const char *ts = _("None"); + char *freeme = NULL; + + if (modtime != 0) { + freeme = http_timestring(talloc_tos(), + nt_time_to_unix(*modtime)); + ts = freeme; + } + d_printf(_("Keyname = %s\n"), keyname); - d_printf(_("Modtime = %s\n"), - modtime - ? http_timestring(talloc_tos(), nt_time_to_unix(*modtime)) - : _("None")); + d_printf(_("Modtime = %s\n"), ts); d_printf("\n"); + + TALLOC_FREE(freeme); } void print_registry_value(const struct registry_value *valvalue, bool raw) |