Commit 316fbe45 authored by Dave Jones's avatar Dave Jones

[AGPGART] Plug memory leak in failure path of ATI GATT allocator.

parent 0ec487a1
......@@ -124,6 +124,11 @@ static int ati_create_gatt_pages(int nr_tables)
for (i = 0; i < nr_tables; i++) {
entry = kmalloc(sizeof(ati_page_map), GFP_KERNEL);
if (entry == NULL) {
while (i>0) {
kfree (tables[i-1]);
i--;
}
kfree (tables);
retval = -ENOMEM;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment