[svn-commits] russell: branch russell/issue_8413 r62585 - in /team/russell/issue_8413: ./ a...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 1 15:14:55 MST 2007


Author: russell
Date: Tue May  1 17:14:54 2007
New Revision: 62585

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62585
Log:
Merged revisions 62546,62549 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r62546 | tilghman | 2007-05-01 16:41:48 -0500 (Tue, 01 May 2007) | 10 lines

Merged revisions 62545 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62545 | tilghman | 2007-05-01 16:34:43 -0500 (Tue, 01 May 2007) | 2 lines

Bug 9590 - Memory leaks around find_user() (found by rayjay, different fixes by me)

........

................
r62549 | russell | 2007-05-01 16:57:58 -0500 (Tue, 01 May 2007) | 20 lines

Merged revisions 62548 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62548 | russell | 2007-05-01 16:57:10 -0500 (Tue, 01 May 2007) | 12 lines

Merged revisions 62547 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62547 | russell | 2007-05-01 16:55:19 -0500 (Tue, 01 May 2007) | 4 lines

Remove an unnecessary check that makes it so if you hang up after doing an
attended transfer before the target extension answers the channel, the transfer
is not successful.  (issue #9338, patch by svanlund)

........

................

................

Modified:
    team/russell/issue_8413/   (props changed)
    team/russell/issue_8413/apps/app_voicemail.c

Propchange: team/russell/issue_8413/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/russell/issue_8413/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May  1 17:14:54 2007
@@ -1,1 +1,1 @@
-/trunk:1-62539
+/trunk:1-62582

Modified: team/russell/issue_8413/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/russell/issue_8413/apps/app_voicemail.c?view=diff&rev=62585&r1=62584&r2=62585
==============================================================================
--- team/russell/issue_8413/apps/app_voicemail.c (original)
+++ team/russell/issue_8413/apps/app_voicemail.c Tue May  1 17:14:54 2007
@@ -2642,6 +2642,7 @@
 	/* No IMAP account available */
 	if (vmu->imapuser[0] == '\0') {
 		ast_log (LOG_WARNING,"IMAP user not set for mailbox %s\n",vmu->mailbox);
+		free_user(vmu);
 		return -1;
  	}
  
@@ -2651,6 +2652,7 @@
 			ast_log (LOG_DEBUG,"Returning before search - user is logged in\n");
  		*newmsgs = vms_p->newmessages;
  		*oldmsgs = vms_p->oldmessages;
+		free_user(vmu);
  		return 0;
  	}
  
@@ -2658,8 +2660,10 @@
 	if (!(vms_p = get_vm_state_by_imapuser(vmu->imapuser, 0)) && !(vms_p = get_vm_state_by_mailbox(mailboxnc, 0))) {
 		if(option_debug > 2)
 			ast_log (LOG_DEBUG,"Adding new vmstate for %s\n",vmu->imapuser);
-		if (!(vms_p = ast_calloc(1, sizeof(*vms_p))))
+		if (!(vms_p = ast_calloc(1, sizeof(*vms_p)))) {
+			free_user(vmu);
 			return -1;
+		}
  		ast_copy_string(vms_p->imapuser,vmu->imapuser, sizeof(vms_p->imapuser));
  		ast_copy_string(vms_p->username, mailboxnc, sizeof(vms_p->username)); /* save for access from interactive entry point */
  		vms_p->mailstream = NIL; /* save for access from interactive entry point */
@@ -2676,6 +2680,7 @@
 	ret = init_mailstream(vms_p, 0);
 	if (!vms_p->mailstream) {
 		ast_log (LOG_ERROR,"Houston we have a problem - IMAP mailstream is NULL\n");
+		free_user(vmu);
 		return -1;
 	}
 
@@ -2721,6 +2726,7 @@
  		*oldmsgs = vms_p->oldmessages;
  	}
 
+	free_user(vmu);
  	return 0;
  }
 
@@ -8380,7 +8386,8 @@
 			ast_config_destroy(msg_cfg);
 			return res;
 		} else {
-			if (find_user(NULL, vmu->context, num)) {
+			struct ast_vm_user vmu2;
+			if (find_user(&vmu2, vmu->context, num)) {
 				struct leave_vm_options leave_options;
 				char mailbox[AST_MAX_EXTENSION * 2 + 2];
 				snprintf(mailbox, sizeof(mailbox), "%s@%s", num, vmu->context);



More information about the svn-commits mailing list