summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_memsup_linux.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_memsup_linux.erl b/src/rabbit_memsup_linux.erl
index 10c8d7e049..6f46bd4b8d 100644
--- a/src/rabbit_memsup_linux.erl
+++ b/src/rabbit_memsup_linux.erl
@@ -138,11 +138,11 @@ read_proc_file(File) ->
{ok, IoDevice} = file:open(File, [read, raw]),
Res = read_proc_file(IoDevice, []),
file:close(IoDevice),
- Res.
+ lists:flatten(lists:reverse(Res)).
read_proc_file(IoDevice, Acc) ->
case file:read(IoDevice, ?BUFFER_SIZE) of
- {ok, Res} -> read_proc_file(IoDevice, Acc ++ Res);
+ {ok, Res} -> read_proc_file(IoDevice, [Res | Acc]);
eof -> Acc
end.