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

Commit b75402c9 authored by Maarten Lankhorst's avatar Maarten Lankhorst
Browse files

drm/qxl: fix gaping memory hole



This is how you implement a memory sieve in a driver. ;-)

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
parent d7e4d671
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -162,12 +162,14 @@ static void
qxl_release_free_list(struct qxl_release *release)
{
	while (!list_empty(&release->bos)) {
		struct ttm_validate_buffer *entry;
		struct qxl_bo_list *entry;
		struct qxl_bo *bo;

		entry = container_of(release->bos.next,
				     struct ttm_validate_buffer, head);

		list_del(&entry->head);
				     struct qxl_bo_list, tv.head);
		bo = to_qxl_bo(entry->tv.bo);
		qxl_bo_unref(&bo);
		list_del(&entry->tv.head);
		kfree(entry);
	}
}