From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 1/4] core: Free buffer allocated with vasprintf()
Date: Wed, 9 Jul 2014 13:56:02 +0200 [thread overview]
Message-ID: <20140709115602.GO17271@phenom.ffwll.local> (raw)
In-Reply-To: <1404902721-9267-1-git-send-email-damien.lespiau@intel.com>
On Wed, Jul 09, 2014 at 11:45:18AM +0100, Damien Lespiau wrote:
> We were leaking a bit.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> lib/igt_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 7ac7ebe..364cdd0 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -591,6 +591,8 @@ void __igt_skip_check(const char *file, const int line,
> "Last errno: %i, %s\n"
> "Test requirement: (%s)\n%s",
> func, file, line, err, strerror(err), check, buf);
> +
> + free(buf);
igt_skip is noreturn, i.e. this adds dead code. No idea how this fix this
without causing a mess.
/me summons the devil and wishes for a garbage collector
> } else {
> igt_skip("Test requirement not met in function %s, file %s:%i:\n"
> "Last errno: %i, %s\n"
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-07-09 11:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 10:45 [PATCH i-g-t 1/4] core: Free buffer allocated with vasprintf() Damien Lespiau
2014-07-09 10:45 ` [PATCH i-g-t 2/4] core: Put the requirement failure messages together Damien Lespiau
2014-07-09 10:45 ` [PATCH i-g-t 3/4] core: Only display the errno message if errno is set Damien Lespiau
2014-07-09 11:57 ` Daniel Vetter
2014-07-09 10:45 ` [PATCH i-g-t 4/4] core: Apply the same treatment to the in errno message in __igt_fail_assert() Damien Lespiau
2014-07-09 11:58 ` Daniel Vetter
2014-07-09 11:56 ` Daniel Vetter [this message]
2014-07-09 12:06 ` [PATCH i-g-t 1/4] core: Free buffer allocated with vasprintf() Damien Lespiau
2014-07-09 12:14 ` Daniel Vetter
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=20140709115602.GO17271@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.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.