⬢ DragonFlyBSD Kernel Audit
DF-4376 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/amd/display/dc/dce112/dce112_resource.c b/sys/dev/drm/amd/display/dc/dce112/dce112_resource.c
index 1111111..3333333 100644
--- a/sys/dev/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/sys/dev/drm/amd/display/dc/dce112/dce112_resource.c
@@ -1352,6 +1352,7 @@ struct resource_pool *dce112_create_resource_pool(
 	if (construct(num_virtual_links, dc, pool))
 		return &pool->base;
 
 	BREAK_TO_DEBUGGER();
+	kfree(pool);	/* DF-4376: destruct(pool) already freed the sub-objects */
 	return NULL;
 }