18 Jan
2024
18 Jan
'24
7:55 p.m.
Esme Povirk (@madewokherd) commented about dlls/shell32/shlfileop.c:
+ + *out = calloc(1, sizeof(struct file_operation)); + if (!*out) + { + ret = E_OUTOFMEMORY; + goto end; + } + + (*out)->wFunc = func; + (*out)->pFrom = from; + (*out)->pTo = to; + return ret; + +end: + if (from) free(from); + if (to) free(to); It's not necessary to check for NULL before calling `free`.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4817#note_58012