All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH 3/3] xl: avoid leaking memory in vdispl parser
Date: Mon, 18 Sep 2017 11:54:30 +0100	[thread overview]
Message-ID: <20170918105430.20543-4-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170918105430.20543-1-wei.liu2@citrix.com>

Coverity-ID: 1418095

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

      parent reply	other threads:[~2017-09-18 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 10:54 [PATCH 0/3] Some coverity fixes for xl/libxl Wei Liu
2017-09-18 10:54 ` [PATCH 1/3] libxl: use libxl__read_xenstore_check in vtpm function Wei Liu
2017-09-18 10:54 ` [PATCH 2/3] libxl: use libxl__read_xenstore_check in vdispl function Wei Liu
2017-09-18 10:54 ` Wei Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918105430.20543-4-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.