153aa9179Sopenharmony_ciFrom 7de8005c52c1fc4289b737c8d12c0c4efd72b605 Mon Sep 17 00:00:00 2001 253aa9179Sopenharmony_ciFrom: Nick Wellnhofer <wellnhofer@aevum.de> 353aa9179Sopenharmony_ciDate: Wed, 2 Nov 2022 15:46:11 +0100 453aa9179Sopenharmony_ciSubject: [PATCH 04/28] malloc-fail: Fix memory leak in xmlCreatePushParserCtxt 553aa9179Sopenharmony_ci 653aa9179Sopenharmony_ciFound with libFuzzer, see #344. 753aa9179Sopenharmony_ci 853aa9179Sopenharmony_ciReference: https://github.com/GNOME/libxml2/commit/865e142c4188d892705a62f9ce9df896e7b4543d 953aa9179Sopenharmony_ciConflict: NA 1053aa9179Sopenharmony_ci--- 1153aa9179Sopenharmony_ci parser.c | 1 + 1253aa9179Sopenharmony_ci 1 file changed, 1 insertion(+) 1353aa9179Sopenharmony_ci 1453aa9179Sopenharmony_cidiff --git a/parser.c b/parser.c 1553aa9179Sopenharmony_ciindex 23b031d..443a216 100644 1653aa9179Sopenharmony_ci--- a/parser.c 1753aa9179Sopenharmony_ci+++ b/parser.c 1853aa9179Sopenharmony_ci@@ -12508,6 +12508,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, 1953aa9179Sopenharmony_ci inputStream->filename = (char *) 2053aa9179Sopenharmony_ci xmlCanonicPath((const xmlChar *) filename); 2153aa9179Sopenharmony_ci if (inputStream->filename == NULL) { 2253aa9179Sopenharmony_ci+ xmlFreeInputStream(inputStream); 2353aa9179Sopenharmony_ci xmlFreeParserCtxt(ctxt); 2453aa9179Sopenharmony_ci xmlFreeParserInputBuffer(buf); 2553aa9179Sopenharmony_ci return(NULL); 2653aa9179Sopenharmony_ci-- 2753aa9179Sopenharmony_ci2.27.0 2853aa9179Sopenharmony_ci 29