From: Ján Tomko Date: Tue, 6 Apr 2021 12:23:31 +0000 (+0200) Subject: vsh: fix memory leak in vshCommandParse X-Git-Tag: v7.3.0-rc1~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a131b8b517a88685ddb5f1b17c4d1a16b9a97b61;p=thirdparty%2Flibvirt.git vsh: fix memory leak in vshCommandParse One of the error branches used a plain free where vshCommandFree was required. https://bugzilla.redhat.com/show_bug.cgi?id=1943415 Signed-off-by: Ján Tomko Reviewed-by: Erik Skultety --- diff --git a/tools/vsh.c b/tools/vsh.c index 552ed29ab9..d9c0a9b80d 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -1530,7 +1530,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial) if (!partial && vshCommandCheckOpts(ctl, c, opts_required, opts_seen) < 0) { - VIR_FREE(c); + vshCommandFree(c); goto syntaxError; }