From: Kevin P. Fleming Date: Sat, 6 Jan 2007 00:02:06 +0000 (+0000) Subject: probably shouldn't leave the mmap'ed file hanging around in memory X-Git-Tag: 1.6.0-beta1~3^2~3537 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a6ed271f505fcc027cc94a92737f29f83aff153;p=thirdparty%2Fasterisk.git probably shouldn't leave the mmap'ed file hanging around in memory git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49735 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index dead94fa24..b154402f37 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2775,8 +2775,10 @@ static struct ast_str *generic_http_callback(enum output_format format, 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); }