BigW Consortium Gitlab

Commit 711c0b65 by David Clark

IoT module double free causing kernel panic

Removed kfree calls to free the slot memory. The use of devm_ calls to create the memory removes the need to call kfree.
parent 9f5a2de7
......@@ -664,7 +664,6 @@ static int iot_slot_probe(struct platform_device *pdev)
cleanup:
if (ret != 0) {
kfree(slot);
slots[new_slot_index] = NULL;
}
unlock:
......@@ -702,7 +701,6 @@ static int iot_slot_remove(struct platform_device *pdev)
}
iot_slot_release_resources(slot);
kfree(slot);
slots[slot_index] = NULL;
done:
......
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