Signed-off-by: Yong Yang <[email protected]>
---
 memory.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/memory.c b/memory.c
index 32427ea..765732b 100644
--- a/memory.c
+++ b/memory.c
@@ -5734,10 +5734,6 @@ dump_mem_map(struct meminfo *mi)
        long buffersize;
        char *outputbuffer;
        int bufferindex;
-
-       buffersize = 1024 * 1024;
-       outputbuffer = GETBUF(buffersize + 512);
-
        char style1[100];
        char style2[100];
        char style3[100];
@@ -5748,6 +5744,9 @@ dump_mem_map(struct meminfo *mi)
                return;
        }
 
+       buffersize = 1024 * 1024;
+       outputbuffer = GETBUF(buffersize + 512);
+
        sprintf((char *)&style1, "%%lx%s%%%dllx%s%%%dlx%s%%8lx %%2d%s",
                        space(MINSPACE),
                        (int)MAX(PADDR_PRLEN, strlen("PHYSICAL")),
-- 
1.9.1

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to