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
This commit is contained in:
Kevin P. Fleming
2007-01-06 00:02:06 +00:00
parent 04e0ba77b0
commit 4a6ed271f5

View File

@@ -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);
}