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

Commit bf225830 authored by Chris Lew's avatar Chris Lew
Browse files

diag: Allocate correct buffer size for PD names



Fix the size passed to kzalloc for PD names.

CRs-Fixed: 2037101
Change-Id: I4a864962011f2c8b9facf374ddf9bf6efe7e69d6
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 925b2207
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -660,7 +660,7 @@ int diag_add_diag_id_to_list(uint8_t diag_id, char *process_name)
	if (!new_item)
		return -ENOMEM;
	kmemleak_not_leak(new_item);
	new_item->process_name = kzalloc(strlen(process_name), GFP_KERNEL);
	new_item->process_name = kzalloc(strlen(process_name) + 1, GFP_KERNEL);
	if (!new_item->process_name) {
		kfree(new_item);
		new_item = NULL;