Resolve a memory leak that would occur on an invalid channel given to Action: Status
authorRussell Bryant <russell@russellbryant.com>
Fri, 6 Feb 2009 10:25:09 +0000 (10:25 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 6 Feb 2009 10:25:09 +0000 (10:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173848 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 2059012..2589d03 100644 (file)
@@ -1862,6 +1862,7 @@ static int action_status(struct mansession *s, const struct message *m)
                c = ast_get_channel_by_name_locked(name);
                if (!c) {
                        astman_send_error(s, m, "No such channel");
+                       ast_free(str);
                        return 0;
                }
        }