[svn-commits] kpfleming: trunk r49735 - /trunk/main/manager.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jan 5 17:02:07 MST 2007


Author: kpfleming
Date: Fri Jan  5 18:02:06 2007
New Revision: 49735

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49735
Log:
probably shouldn't leave the mmap'ed file hanging around in memory

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=49735&r1=49734&r2=49735
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Jan  5 18:02:06 2007
@@ -2775,8 +2775,10 @@
 		fclose(s->f);
 		if (format == FORMAT_XML || format == FORMAT_HTML) {
 			if (l) {
-				if ((buf = mmap(NULL, l, PROT_READ, MAP_SHARED, s->fd, 0)))
+				if ((buf = mmap(NULL, l, PROT_READ, MAP_SHARED, s->fd, 0))) {
 					xml_translate(&out, buf, params, format);
+					munmap(buf, l);
+				}
 			} else {
 				xml_translate(&out, "", params, format);
 			}



More information about the svn-commits mailing list