summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlmemory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmlmemory.c b/xmlmemory.c
index 25d93185..37dcf3b4 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -583,13 +583,15 @@ xmlMemBlocks(void) {
static void
xmlMemContentShow(FILE *fp, MEMHDR *p)
{
- int i,j,k,len = p->mh_size;
- const char *buf = (const char *) HDR_2_CLIENT(p);
+ int i,j,k,len;
+ const char *buf;
if (p == NULL) {
fprintf(fp, " NULL");
return;
}
+ len = p->mh_size;
+ buf = (const char *) HDR_2_CLIENT(p);
for (i = 0;i < len;i++) {
if (buf[i] == 0) break;