app_page: Fix a memory leak on every Page().
authorRussell Bryant <russell@russellbryant.com>
Sat, 24 Mar 2012 03:11:43 +0000 (03:11 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 24 Mar 2012 03:11:43 +0000 (03:11 +0000)
dial_list is a dynamically allocated array that is allocated at the beginning
of Page() based on how many devices will be dialed.  This was never being freed.
........

Merged revisions 360363 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 360364 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_page.c

index f9170d4..61172fc 100644 (file)
@@ -329,6 +329,8 @@ static int page_exec(struct ast_channel *chan, const char *data)
                ast_dial_destroy(dial);
        }
 
+       ast_free(dial_list);
+
        return -1;
 }