libelftc: Add a missing check for an error from vector_str_init().
While here consistently use the same spelling for such checks. CID: 1376769 MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a3c35da61b
commit
334f09a65b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357536
@ -303,12 +303,11 @@ init_demangle_data(struct demangle_data *d)
|
|||||||
|
|
||||||
d->type = ENCODE_FUNC;
|
d->type = ENCODE_FUNC;
|
||||||
|
|
||||||
if (vector_str_init(&d->vec) == false)
|
if (!vector_str_init(&d->vec))
|
||||||
return (false);
|
return (false);
|
||||||
|
|
||||||
if (vector_str_init(&d->arg) == false) {
|
if (!vector_str_init(&d->arg)) {
|
||||||
vector_str_dest(&d->vec);
|
vector_str_dest(&d->vec);
|
||||||
|
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,12 +389,11 @@ init_demangle_data(struct demangle_data *d)
|
|||||||
|
|
||||||
d->type = ENCODE_FUNC;
|
d->type = ENCODE_FUNC;
|
||||||
|
|
||||||
if (vector_str_init(&d->vec) == false)
|
if (!vector_str_init(&d->vec))
|
||||||
return (false);
|
return (false);
|
||||||
|
|
||||||
if (vector_str_init(&d->arg) == false) {
|
if (!vector_str_init(&d->arg)) {
|
||||||
vector_str_dest(&d->vec);
|
vector_str_dest(&d->vec);
|
||||||
|
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1659,7 +1659,8 @@ cpp_demangle_read_local_name(struct cpp_demangle_data *ddata)
|
|||||||
if (*(++ddata->cur) == '\0')
|
if (*(++ddata->cur) == '\0')
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
vector_str_init(&local_name);
|
if (!vector_str_init(&local_name))
|
||||||
|
return (0);
|
||||||
ddata->cur_output = &local_name;
|
ddata->cur_output = &local_name;
|
||||||
|
|
||||||
if (!cpp_demangle_read_encoding(ddata)) {
|
if (!cpp_demangle_read_encoding(ddata)) {
|
||||||
@ -3953,7 +3954,7 @@ vector_type_qualifier_init(struct vector_type_qualifier *v)
|
|||||||
|
|
||||||
assert(v->q_container != NULL);
|
assert(v->q_container != NULL);
|
||||||
|
|
||||||
if (vector_str_init(&v->ext_name) == false) {
|
if (!vector_str_init(&v->ext_name)) {
|
||||||
free(v->q_container);
|
free(v->q_container);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user