Skip to content
Snippets Groups Projects
Commit c2766270 authored by Hyeonsik Song's avatar Hyeonsik Song Committed by Mathias Kresin
Browse files

firmware-utils: tplink-safeloader: add calloc error handling


Signed-off-by: default avatarHyeonsik Song <blogcin@naver.com>
parent eccde89a
No related branches found
No related tags found
No related merge requests found
......@@ -1638,6 +1638,10 @@ static int add_flash_partition(
}
part_list->name = calloc(1, strlen(name) + 1);
if (!part_list->name) {
error(1, 0, "Unable to allocate memory");
}
memcpy((char *)part_list->name, name, strlen(name));
part_list->base = base;
part_list->size = size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment