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:
Ondrej Holy 2018-08-20 09:33:42 +02:00
parent 91c398dc94
commit 24eb53e207

View File

@ -331,6 +331,7 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32
if (!pool)
{
munmap(data, allocSize * nbuffers);
ret = UWAC_ERROR_NOMEMORY;
goto error_mmap;
}
@ -500,7 +501,7 @@ UwacReturnCode UwacDestroyWindow(UwacWindow** pwindow)
wl_region_destroy(w->opaque_region);
if (w->input_region)
wl_region_destroy(w->opaque_region);
wl_region_destroy(w->input_region);
wl_surface_destroy(w->surface);
wl_list_remove(&w->link);