Fix various memory leaks reported by Coverity

Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
This commit is contained in:
Ondrej Holy
2021-04-27 10:04:47 +02:00
committed by akallabeth
parent ac25baa5ee
commit 892cbe3261
17 changed files with 48 additions and 6 deletions

View File

@@ -394,6 +394,8 @@ int rdtk_nine_patch_engine_init(rdtkEngine* engine)
else
winpr_image_free(image, TRUE);
}
else
winpr_image_free(image, TRUE);
}
if (!engine->textField9patch)
@@ -402,6 +404,7 @@ int rdtk_nine_patch_engine_init(rdtkEngine* engine)
BYTE* data;
status = -1;
size = rdtk_get_embedded_resource_file("textfield_default.9.png", &data);
image = NULL;
if (size > 0)
{
@@ -420,6 +423,8 @@ int rdtk_nine_patch_engine_init(rdtkEngine* engine)
else
winpr_image_free(image, TRUE);
}
else
winpr_image_free(image, TRUE);
}
return 1;