FS-7513: fix compiler warning about uninitialized var and make sure allocated memory is filled with 0

This commit is contained in:
Seven Du 2015-01-31 12:29:02 +08:00 committed by Michael Jerris
parent a6dbc2c6f8
commit 4b1979a119
1 changed files with 2 additions and 1 deletions

View File

@ -789,10 +789,11 @@ static void conference_parse_layouts(conference_obj_t *conference)
}
lg = switch_core_alloc(conference->pool, sizeof(*lg));
memset(lg, 0, sizeof(*lg));
while(x_layout) {
const char *name = x_layout->txt;
layout_node_t *lnode, *last_lnode;
layout_node_t *lnode, *last_lnode = NULL;
if ((lnode = switch_core_hash_find(conference->layout_hash, name))) {