diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 16:51:36 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 16:51:36 +0000 |
commit | 66d36b9d71caaa6dcf0eba7a63b87644fbf6e764 (patch) | |
tree | 34d5d0105145d5017c5769bd8e2368bc731ac7c7 | |
parent | bd0db276cb5eecdef341113704f9bce822a675c0 (diff) |
Merged revisions 212506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r212506 | jpeeler | 2009-08-17 11:50:45 -0500 (Mon, 17 Aug 2009) | 19 lines
Merged revisions 212498 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines
Fix segfault when reloading chan_misdn.
If more ports were specified than configured in misdn.conf a reload would crash
asterisk. The problem was the unconfigured port was using data from the
previously configured port. When the data for an unconfigured port was freed a
crash would result from the double free.
(closes issue #12113)
Reported by: agupta
Patches:
bug12113.patch uploaded by jpeeler (license 325)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@212507 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/misdn_config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/misdn_config.c b/channels/misdn_config.c index 50ef69ee5..5bf24227f 100644 --- a/channels/misdn_config.c +++ b/channels/misdn_config.c @@ -1005,6 +1005,11 @@ static void _build_port_config (struct ast_variable *v, char *cat) } for (i = 0; i < (max_ports + 1); ++i) { + if (i > 0 && cfg_for_ports[0]) { + /* default category, will populate the port_cfg with additional port + categories in subsequent calls to this function */ + memset(cfg_tmp, 0, sizeof(cfg_tmp)); + } if (cfg_for_ports[i]) { memcpy(port_cfg[i], cfg_tmp, sizeof(cfg_tmp)); } |