readelf: Fix the check for an error from realloc().
Use err() instead of errx() while here, since realloc() sets errno. CID: 1401326 MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
dfa169049b
commit
37fa1df2d1
@ -6298,8 +6298,8 @@ search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc,
|
|||||||
if (*la_list_cap == *la_list_len) {
|
if (*la_list_cap == *la_list_len) {
|
||||||
*la_list = realloc(*la_list,
|
*la_list = realloc(*la_list,
|
||||||
*la_list_cap * 2 * sizeof(**la_list));
|
*la_list_cap * 2 * sizeof(**la_list));
|
||||||
if (la_list == NULL)
|
if (*la_list == NULL)
|
||||||
errx(EXIT_FAILURE, "realloc failed");
|
err(EXIT_FAILURE, "realloc failed");
|
||||||
*la_list_cap *= 2;
|
*la_list_cap *= 2;
|
||||||
}
|
}
|
||||||
la = &((*la_list)[*la_list_len]);
|
la = &((*la_list)[*la_list_len]);
|
||||||
|
Loading…
Reference in New Issue
Block a user