summaryrefslogtreecommitdiff
path: root/source3/utils/net_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_cache.c')
-rw-r--r--source3/utils/net_cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c
index cabb6d5280..5e7db38515 100644
--- a/source3/utils/net_cache.c
+++ b/source3/utils/net_cache.c
@@ -216,7 +216,7 @@ static int net_cache_del(struct net_context *c, int argc, const char **argv)
static int net_cache_get(struct net_context *c, int argc, const char **argv)
{
const char* keystr = argv[0];
- char* valuestr;
+ char* valuestr = NULL;
time_t timeout;
if (argc < 1 || c->display_usage) {
@@ -226,6 +226,7 @@ static int net_cache_get(struct net_context *c, int argc, const char **argv)
if (gencache_get(keystr, &valuestr, &timeout)) {
print_cache_entry(keystr, valuestr, timeout, NULL);
+ SAFE_FREE(valuestr);
return 0;
}