26 Jun
2023
26 Jun
'23
7:06 a.m.
eric pouech (@epo) commented about dlls/dbghelp/pe_module.c:
if (name) lstrcpyW(loaded_name, name); } if (!(modfmt = HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct pe_module_info)))) - return NULL; + goto done;
I'd rather avoid the goto, and most importantly you don't close the file handle. perhaps ``` modfmt = HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct pe_module_info)); if (modfmt) { ... } if (!module) HeapFree(...) ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3016#note_36749