libfreerdp-chanman: use xnew macro.

This commit is contained in:
Vic Lee 2011-07-13 22:25:07 +08:00
parent f251501a3e
commit dac8f5fd21
1 changed files with 2 additions and 3 deletions

View File

@ -542,15 +542,14 @@ rdpChanMan* freerdp_chanman_new(void)
rdpChanMan* chan_man;
rdpChanManList* list;
chan_man = (rdpChanMan*)xmalloc(sizeof(rdpChanMan));
memset(chan_man, 0, sizeof(rdpChanMan));
chan_man = xnew(rdpChanMan);
chan_man->sync_data_sem = freerdp_sem_new(1);
chan_man->event_sem = freerdp_sem_new(1);
chan_man->signal = wait_obj_new();
/* Add it to the global list */
list = (rdpChanManList*)xmalloc(sizeof(rdpChanManList));
list = xnew(rdpChanManList);
list->chan_man = chan_man;
freerdp_mutex_lock(g_mutex_list);