Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de47a9cd authored by Dave Airlie's avatar Dave Airlie
Browse files

drm/radeon: fix use after free in ATRM bios reading code.

parent 3f7e3632
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -59,8 +59,9 @@ static int radeon_atrm_call(acpi_handle atrm_handle, uint8_t *bios,

	obj = (union acpi_object *)buffer.pointer;
	memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length);
	len = obj->buffer.length;
	kfree(buffer.pointer);
	return obj->buffer.length;
	return len;
}

bool radeon_atrm_supported(struct pci_dev *pdev)