Merge pull request #302 from dorianj/master

freerdp-channels: freerdp_channels_send_event free event in case of error
This commit is contained in:
Marc-André Moreau 2011-12-21 17:19:48 -08:00
commit 537e831197

View File

@ -46,6 +46,7 @@
#include <freerdp/utils/mutex.h>
#include <freerdp/utils/wait_obj.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/event.h>
#include "libchannels.h"
@ -802,6 +803,7 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* chan_man, RDP_EVENT* ev
if (name == NULL)
{
DEBUG_CHANNELS("unknown event_class %d", event->event_class);
freerdp_event_free(event);
return 1;
}
@ -809,6 +811,7 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* chan_man, RDP_EVENT* ev
if (lchan_data == NULL)
{
DEBUG_CHANNELS("could not find channel name %s", name);
freerdp_event_free(event);
return 1;
}
if (lchan_data->open_event_proc != NULL)