diff --git a/tools/virt-admin.c b/tools/virt-admin.c index c47053639dd0989b6159bd7cc3a8f2fbf4890d61..60697e630d96254f012c44365a57a9cb7d4129ed 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -323,7 +323,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) int nsrvs = 0; size_t i; bool ret = false; - const char *uri = NULL; + char *uri = NULL; virAdmServerPtr *srvs = NULL; vshAdmControlPtr priv = ctl->privData; @@ -347,6 +347,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) virAdmServerFree(srvs[i]); VIR_FREE(srvs); } + VIR_FREE(uri); return ret; }