core/listner: fix possible problem in _free

This commit is contained in:
Bernhard Miklautz 2015-07-27 11:24:21 +02:00
parent c3ea07f3d9
commit a342d40158

View File

@ -445,11 +445,11 @@ freerdp_listener* freerdp_listener_new(void)
void freerdp_listener_free(freerdp_listener* instance)
{
rdpListener* listener;
listener = (rdpListener*) instance->listener;
free(listener);
free(instance);
if (instance)
{
free(instance->listener);
free(instance);
}
}