[libvirt PATCH] vsh: fix memory leak in vshCommandParse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tools/vsh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
             }
 
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux