libelftc: Fix memory leaks in the C++ demanglers.
CID: 1262518, 1262519, 1262520, 1262529 MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
ab3b51df28
commit
a3c35da61b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357535
@ -206,8 +206,10 @@ cpp_demangle_ARM(const char *org)
|
||||
&arg_len)) == NULL)
|
||||
goto clean;
|
||||
|
||||
if (vector_str_push(&d.arg, arg, arg_len) == false)
|
||||
if (vector_str_push(&d.arg, arg, arg_len) == false) {
|
||||
free(arg);
|
||||
goto clean;
|
||||
}
|
||||
|
||||
free(arg);
|
||||
|
||||
@ -956,7 +958,7 @@ read_op_user(struct demangle_data *d)
|
||||
goto clean;
|
||||
|
||||
if (VEC_PUSH_STR(&d->vec, "::operator ") == false)
|
||||
return (false);
|
||||
goto clean;
|
||||
|
||||
if (vector_str_push(&d->vec, to_str, to_len) == false)
|
||||
goto clean;
|
||||
|
@ -219,8 +219,10 @@ cpp_demangle_gnu2(const char *org)
|
||||
&arg_len)) == NULL)
|
||||
goto clean;
|
||||
|
||||
if (vector_str_push(&d.arg, arg, arg_len) == false)
|
||||
if (vector_str_push(&d.arg, arg, arg_len) == false) {
|
||||
free(arg);
|
||||
goto clean;
|
||||
}
|
||||
|
||||
free(arg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user