libelftc: Fix a memory leak in cpp_demangle_read_type().

CID:		1305425
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2020-03-20 16:25:06 +00:00
parent d5e7add6b5
commit c364ccf9ce

View File

@ -2912,7 +2912,7 @@ cpp_demangle_read_type(struct cpp_demangle_data *ddata,
if (len <= 0)
goto clean;
if (!vector_str_push(&v.ext_name, ddata->cur, len))
return (0);
goto clean;
ddata->cur += len;
if (!vector_type_qualifier_push(&v, TYPE_EXT))
goto clean;