From: Seven Du Date: Sat, 31 Jan 2015 04:29:02 +0000 (+0800) Subject: FS-7513: fix compiler warning about uninitialized var and make sure allocated memory... X-Git-Tag: v1.6.2~614^2~449 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b1979a119ca8f0008b0be92c0e7910f49e64554;p=thirdparty%2Ffreeswitch.git FS-7513: fix compiler warning about uninitialized var and make sure allocated memory is filled with 0 --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 46f1ab7e31..7afc3f7f85 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -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))) {