mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
uwac: Fix leak found by covscan
leaked_storage: Variable "data" going out of scope leaks the storage it points to. copy_paste_error: "opaque_region" in "w->opaque_region" looks like a copy-paste error.
This commit is contained in:
parent
91c398dc94
commit
24eb53e207
@ -331,6 +331,7 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32
|
|||||||
|
|
||||||
if (!pool)
|
if (!pool)
|
||||||
{
|
{
|
||||||
|
munmap(data, allocSize * nbuffers);
|
||||||
ret = UWAC_ERROR_NOMEMORY;
|
ret = UWAC_ERROR_NOMEMORY;
|
||||||
goto error_mmap;
|
goto error_mmap;
|
||||||
}
|
}
|
||||||
@ -500,7 +501,7 @@ UwacReturnCode UwacDestroyWindow(UwacWindow** pwindow)
|
|||||||
wl_region_destroy(w->opaque_region);
|
wl_region_destroy(w->opaque_region);
|
||||||
|
|
||||||
if (w->input_region)
|
if (w->input_region)
|
||||||
wl_region_destroy(w->opaque_region);
|
wl_region_destroy(w->input_region);
|
||||||
|
|
||||||
wl_surface_destroy(w->surface);
|
wl_surface_destroy(w->surface);
|
||||||
wl_list_remove(&w->link);
|
wl_list_remove(&w->link);
|
||||||
|
Loading…
Reference in New Issue
Block a user