diff mbox

[v2,3/3] xl: avoid leaking memory in vdispl parser

Message ID 20170918135614.30868-4-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Sept. 18, 2017, 1:56 p.m. UTC
Coverity-ID: 1418095

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

Patch

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;