mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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 <jtomko@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
afda589d05
commit
a131b8b517
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user