]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_dptools] scan-build: Fix "Potential leak of memory pointed to by 'head'" 387/head
authorAndrey Volk <andywolk@gmail.com>
Wed, 19 Feb 2020 15:54:29 +0000 (19:54 +0400)
committerAndrey Volk <andywolk@gmail.com>
Wed, 19 Feb 2020 15:54:29 +0000 (19:54 +0400)
src/mod/applications/mod_dptools/mod_dptools.c

index 50601be2fca43d524f93c3ae1bee391d12f7abbe..176b38074c8e639f13fb100cfc4e4912f47b17f2 100644 (file)
@@ -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));