[core,settings] WINPR_ATTR_MALLOC for alloc_array
This commit is contained in:
parent
3f824daca4
commit
7e7ea3e688
@ -399,6 +399,12 @@ static BOOL monitor_has_gaps(const rdpSettings* settings, UINT32 start, UINT32 c
|
||||
return !hasNeighbor;
|
||||
}
|
||||
|
||||
static void alloc_free(UINT32** ptr)
|
||||
{
|
||||
free((void*)ptr);
|
||||
}
|
||||
|
||||
WINPR_ATTR_MALLOC(alloc_free, 1)
|
||||
static UINT32** alloc_array(size_t count)
|
||||
{
|
||||
// NOLINTNEXTLINE(clang-analyzer-unix.MallocSizeof)
|
||||
@ -500,7 +506,7 @@ static BOOL find_path_exists_with_dijkstra(UINT32** graph, size_t count, UINT32
|
||||
}
|
||||
}
|
||||
}
|
||||
free((void*)cost);
|
||||
alloc_free(cost);
|
||||
free(distance);
|
||||
free(visited);
|
||||
free(parent);
|
||||
@ -529,7 +535,7 @@ static BOOL freerdp_settings_client_monitors_have_gaps(const rdpSettings* settin
|
||||
rc = !find_path_exists_with_dijkstra(graph, count, 0);
|
||||
|
||||
fail:
|
||||
free((void*)graph);
|
||||
alloc_free(graph);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user