All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: [igt-dev] [PATCH i-g-t] lib/i915/intel_memory_region: free query_info in gem_get_lmem_region_count
Date: Wed,  2 Jun 2021 13:10:28 -0700	[thread overview]
Message-ID: <20210602201028.12494-1-ashutosh.dixit@intel.com> (raw)

query_info calloc'd in gem_get_query_memory_regions should be freed in
gem_get_lmem_region_count.

Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Fixes: f32993a2ed ("lib/i915/intel_memory_region: Add new memory region lib")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/intel_memory_region.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
index 983ac4df07..144ae12ca7 100644
--- a/lib/i915/intel_memory_region.c
+++ b/lib/i915/intel_memory_region.c
@@ -149,6 +149,7 @@ uint8_t gem_get_lmem_region_count(int fd)
 		if (query_info->regions[i].region.memory_class == I915_MEMORY_CLASS_DEVICE)
 			lmem_regions += 1;
 	}
+	free(query_info);
 
 	return lmem_regions;
 }
-- 
2.31.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2021-06-02 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 20:10 Ashutosh Dixit [this message]
2021-06-02 20:47 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/intel_memory_region: free query_info in gem_get_lmem_region_count (rev2) Patchwork
2021-06-02 23:01 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-06-03 12:32 ` [igt-dev] [PATCH i-g-t] lib/i915/intel_memory_region: free query_info in gem_get_lmem_region_count Matthew Auld
  -- strict thread matches above, loose matches on Subject: below --
2021-06-02 19:53 Ashutosh Dixit

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=20210602201028.12494-1-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.auld@intel.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 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.