mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user