Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 i915: Fix memory leak in...



details:   https://anonhg.NetBSD.org/src/rev/dc0ca110bec8
branches:  trunk
changeset: 1029153:dc0ca110bec8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Dec 24 00:14:03 2021 +0000

description:
i915: Fix memory leak in active node allocation under #ifdef NetBSD.

Potential fix for PR kern/56573.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_active.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 59912a58dcf3 -r dc0ca110bec8 sys/external/bsd/drm2/dist/drm/i915/i915_active.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_active.c Fri Dec 24 00:13:53 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_active.c Fri Dec 24 00:14:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_active.c,v 1.9 2021/12/19 12:12:39 riastradh Exp $        */
+/*     $NetBSD: i915_active.c,v 1.10 2021/12/24 00:14:03 riastradh Exp $       */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_active.c,v 1.9 2021/12/19 12:12:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_active.c,v 1.10 2021/12/24 00:14:03 riastradh Exp $");
 
 #include <linux/debugobjects.h>
 
@@ -300,6 +300,7 @@
        node = rb_tree_find_node(&ref->tree.rbr_tree, &idx);
        if (node) {
                KASSERT(node->timeline == idx);
+               kmem_cache_free(global.slab_cache, prealloc);
                goto out;
        }
 #else



Home | Main Index | Thread Index | Old Index