From c364ccf9ce2d1d0fc24247aa771cf52e5dfb532a Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 20 Mar 2020 16:25:06 +0000 Subject: [PATCH] libelftc: Fix a memory leak in cpp_demangle_read_type(). CID: 1305425 MFC after: 1 week Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c b/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c index 8127919f1cf6..fa9fdeb83ea6 100644 --- a/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c +++ b/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c @@ -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;