[svn-commits] tilghman: branch 1.2 r57648 - /branches/1.2/apps/app_voicemail.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Mar 2 23:36:56 MST 2007


Author: tilghman
Date: Sat Mar  3 00:36:55 2007
New Revision: 57648

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57648
Log:
Memory leak of a list, if call recording was abandoned

Modified:
    branches/1.2/apps/app_voicemail.c

Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?view=diff&rev=57648&r1=57647&r2=57648
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Sat Mar  3 00:36:55 2007
@@ -3626,6 +3626,7 @@
 				vmtmp = vmtmp->next;
 				free_user(vmfree);
 			}
+			extensions = NULL;
 			if (saved_messages > 0) {
 				/* give confirmation that the message was saved */
 				/* commented out since we can't forward batches yet
@@ -3638,6 +3639,13 @@
 				res = ast_play_and_wait(chan, "vm-msgsaved");
 			}	
 		}
+	}
+
+	/* If anything failed above, we still have this list to free */
+	while (extensions) {
+		vmfree = extensions;
+		extensions = extensions->next;
+		free_user(vmfree);
 	}
 	return res ? res : cmd;
 }



More information about the svn-commits mailing list