From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Alan Previn <alan.previn.teres.alexis@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Correctly free guc capture struct on error
Date: Thu, 24 Mar 2022 10:35:44 +0100 [thread overview]
Message-ID: <f40a1ecc-742a-de77-9d23-b2ca48ffac85@linux.intel.com> (raw)
In-Reply-To: <20220324000439.2370440-1-daniele.ceraolospurio@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
On 3/24/2022 1:04 AM, Daniele Ceraolo Spurio wrote:
> On error the "new" allocation is not freed, so add the required kfree.
>
> Fixes: 247f8071d5893 ("drm/i915/guc: Pre-allocate output nodes for extraction")
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: John Harrison <john.c.harrison@intel.com>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> index afdcbe63e9eb1..c4e25966d3e9f 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -1040,6 +1040,7 @@ guc_capture_alloc_one_node(struct intel_guc *guc)
> if (!new->reginfo[i].regs) {
> while (i)
> kfree(new->reginfo[--i].regs);
> + kfree(new);
> return NULL;
> }
> }
prev parent reply other threads:[~2022-03-24 9:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 0:04 [Intel-gfx] [PATCH] drm/i915/guc: Correctly free guc capture struct on error Daniele Ceraolo Spurio
2022-03-24 0:39 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2022-03-24 1:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-24 2:18 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-24 9:35 ` Das, Nirmoy [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=f40a1ecc-742a-de77-9d23-b2ca48ffac85@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox