From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Lyude Paul <lyude@redhat.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak
Date: Fri, 30 Nov 2018 15:02:52 +0100 [thread overview]
Message-ID: <d2ebd9a66c096db3ca8f64f0637b656790f5a4fc.camel@bootlin.com> (raw)
In-Reply-To: <21027818b010f3322de3717cd0c653079cb279f9.camel@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2171 bytes --]
Hi,
On Tue, 2018-11-20 at 20:44 -0500, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> Do you need me to push this? Or do you have push access for igt nowadays?
Sorry for the delayed answer. I don't have commit access, so feel free
to push this!
Thanks,
Paul
> On Wed, 2018-11-14 at 16:29 +0100, Paul Kocialkowski wrote:
> > The connector and EDID blob retrieved when checking for analog bridges
> > need to be freed before returning from the associated function.
> >
> > Fixes: f8d6afa67 ("tests/chamelium: Detect analog bridges and handle
> > EDID accordingly")
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > ---
> > tests/kms_chamelium.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > index e0e3e3f1..55b346a9 100644
> > --- a/tests/kms_chamelium.c
> > +++ b/tests/kms_chamelium.c
> > @@ -175,8 +175,10 @@ check_analog_bridge(data_t *data, struct chamelium_port
> > *port)
> > unsigned char *edid;
> > char edid_vendor[3];
> >
> > - if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA)
> > + if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
> > + drmModeFreeConnector(connector);
> > return false;
> > + }
> >
> > igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
> > DRM_MODE_OBJECT_CONNECTOR, "EDID",
> > NULL,
> > @@ -191,14 +193,14 @@ check_analog_bridge(data_t *data, struct
> > chamelium_port *port)
> > ((edid[9] & 0xe0) >> 5)) + '@';
> > edid_vendor[2] = (edid[9] & 0x1f) + '@';
> >
> > + drmModeFreePropertyBlob(edid_blob);
> > + drmModeFreeConnector(connector);
> > +
> > /* Analog bridges provide their own EDID */
> > if (edid_vendor[0] != 'I' || edid_vendor[1] != 'G' ||
> > edid_vendor[0] != 'T')
> > return true;
> >
> > - drmModeFreePropertyBlob(edid_blob);
> > - drmModeFreeConnector(connector);
> > -
> > return false;
> > }
> >
--
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-11-30 14:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 15:29 [igt-dev] [PATCH i-g-t] chamelium: Fix analog bridge detection memory leak Paul Kocialkowski
2018-11-14 16:12 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-11-15 3:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-11-21 1:44 ` [igt-dev] [PATCH i-g-t] " Lyude Paul
2018-11-30 14:02 ` Paul Kocialkowski [this message]
2018-12-04 0:54 ` Lyude Paul
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=d2ebd9a66c096db3ca8f64f0637b656790f5a4fc.camel@bootlin.com \
--to=paul.kocialkowski@bootlin.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lyude@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox