15 Dec
2023
15 Dec
'23
3:54 p.m.
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphicspath.c:
* pointer on success * NULL on allocation problems */ -static path_list_node_t* add_path_list_node(path_list_node_t *node, REAL x, REAL y, BOOL type) +static path_list_node_t* add_path_list_node(path_list_node_t **node, REAL x, REAL y, BOOL type) { path_list_node_t *new;
+ if (!*node) + { + *node = calloc(1, sizeof(path_list_node_t)); All fields are immediately initialized below, so I think it's fine to use `malloc`.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3288#note_56100