]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix another leak
authorBrian West <brian@freeswitch.org>
Wed, 27 May 2009 01:58:19 +0000 (01:58 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 27 May 2009 01:58:19 +0000 (01:58 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13447 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index cf40b4a18807df80b05c154df5cf0477a34d3b18..81225b104b2e7a681dcdedfa62506e0d00b6045e 100644 (file)
@@ -1154,7 +1154,7 @@ SWITCH_STANDARD_API(presence_api_function)
 
 SWITCH_STANDARD_API(chat_api_function)
 {
-       char *lbuf, *argv[5];
+       char *lbuf = NULL, *argv[5];
        int argc = 0;
 
        if (!switch_strlen_zero(cmd) && (lbuf = strdup(cmd))
@@ -1170,6 +1170,7 @@ SWITCH_STANDARD_API(chat_api_function)
                stream->write_function(stream, "Invalid");
        }
 
+       switch_safe_free(lbuf);
        return SWITCH_STATUS_SUCCESS;
 }