Alistair Leslie-Hughes : dbghelp: Fix possible memory leak (Coverity).

Alexandre Julliard julliard at winehq.org
Thu Dec 9 15:34:28 CST 2021


Module: wine
Branch: master
Commit: 33308a577cb05681ce132910def1345f8681c06b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=33308a577cb05681ce132910def1345f8681c06b

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Dec  9 07:33:57 2021 +1100

dbghelp: Fix possible memory leak (Coverity).

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/dwarf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 67440e97fe8..7515e540778 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2314,7 +2314,10 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_debug_info_t* di)
      * Actual thunks will be created in elf_module from the symbol table
      */
     if (elf_is_in_thunk_area(di->unit_ctx->module_ctx->load_offset + addr_ranges[0].low, di->unit_ctx->module_ctx->thunks) >= 0)
+    {
+        free(addr_ranges);
         return NULL;
+    }
     ret_type = dwarf2_lookup_type(di);
 
     /* FIXME: assuming C source code */




More information about the wine-cvs mailing list