diff --git a/tools/vsh.c b/tools/vsh.c index 1a5b6e8efecf9a0023a4d763793a4e7d6e59dfb6..54c4614a67814624b3d945c74ce40e140876d607 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2552,8 +2552,8 @@ vshReadlineInit(vshControl *ctl) char *name_capitalized = NULL; int max_history = 500; int ret = -1; + char *histsize_env = NULL; const char *histsize_str = NULL; - const char *histsize_env = NULL; const char *strings[] = { name_capitalized, "HISTSIZE", @@ -2613,6 +2613,7 @@ vshReadlineInit(vshControl *ctl) cleanup: VIR_FREE(userdir); VIR_FREE(name_capitalized); + VIR_FREE(histsize_env); return ret; }