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

[Xen-devel] [PATCH v2 3/3] xl: avoid leaking memory in vdispl parser



Coverity-ID: 1418095

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/xl/xl_parse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 9965b83c44..0678fbc1b0 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -832,6 +832,8 @@ int parse_vdispl_config(libxl_device_vdispl *vdispl, char 
*token)
 
             rc= sscanf(resolution, "%ux%u", &vdispl->connectors[i].width,
                        &vdispl->connectors[i].height);
+            free(resolution);
+
             if (rc != 2) {
                 fprintf(stderr, "Can't parse connector resolution\n");
                 goto out;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.