channels/urbdrc: fix segfault

Fix segmentation fault in urbdrc_main.c caused by missing memset.
This commit is contained in:
TaGUNil 2014-12-09 19:28:13 +03:00
parent 53686e414a
commit da39686a31

View File

@ -908,6 +908,8 @@ static int urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallb
URBDRC_CHANNEL_CALLBACK* callback;
WLog_VRB(TAG, "");
callback = (URBDRC_CHANNEL_CALLBACK*) malloc(sizeof(URBDRC_CHANNEL_CALLBACK));
memset(callback, 0, sizeof(URBDRC_CHANNEL_CALLBACK));
callback->iface.OnDataReceived = urbdrc_on_data_received;
callback->iface.OnClose = urbdrc_on_close;
callback->plugin = listener_callback->plugin;