From: Andrey Volk Date: Wed, 19 Feb 2020 15:54:29 +0000 (+0400) Subject: [mod_dptools] scan-build: Fix "Potential leak of memory pointed to by 'head'" X-Git-Tag: v1.10.3^2~144^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F387%2Fhead;p=thirdparty%2Ffreeswitch.git [mod_dptools] scan-build: Fix "Potential leak of memory pointed to by 'head'" --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 50601be2fc..176b38074c 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -3868,7 +3868,7 @@ static void pickup_add_session(switch_core_session_t *session, const char *key) key = dup_key; } - node = malloc(sizeof(*node)); + switch_zmalloc(node, sizeof(*node)); switch_assert(node); node->key = strdup(key); node->uuid = strdup(switch_core_session_get_uuid(session));