diff -ur dvipdfmx-20120420.orig/src/mem.c dvipdfmx-20120420/src/mem.c
--- dvipdfmx-20120420.orig/src/mem.c	2010-04-05 02:34:08.000000000 +0200
+++ dvipdfmx-20120420/src/mem.c	2012-04-25 17:56:01.000000000 +0200
@@ -33,7 +33,7 @@
 
 #include "dpxutil.h"
 
-#define MEM_LINE   128
+#define MEM_LINE   180
 
 static struct ht_table *mem_ht;
 static long int mem_event;
@@ -71,9 +71,10 @@
 
 void *mem_add(void *ptr, const char *file, const char *function, int line) {
   if (ptr && !mem_internal) {
+    char **p;
     mem_internal = 1;
     mem_str = malloc(MEM_LINE);
-    char **p = malloc(sizeof(ptr));
+    p = malloc(sizeof(ptr));
     *p = ptr;
     snprintf(mem_str, MEM_LINE, "(0x%08lx) %s (%s, %d)"
 #ifdef __GNUC__
@@ -125,7 +126,8 @@
 void mem_debug_check(void)
 {
   if (mem_count)
-    WARN("%ld memory objects still allocated\n", mem_count);
+    WARN("%ld memory objects still allocated\n"
+         "You may want to report this to tex-k@tug.org\n", mem_count);
 }
 
 void *mem_add(void *ptr) {
diff -ur dvipdfmx-20120420.orig/src/spc_pdfm.c dvipdfmx-20120420/src/spc_pdfm.c
--- dvipdfmx-20120420.orig/src/spc_pdfm.c	2012-04-20 01:54:05.000000000 +0200
+++ dvipdfmx-20120420/src/spc_pdfm.c	2012-04-25 17:33:56.000000000 +0200
@@ -1420,6 +1420,7 @@
 	    fread(work_buffer, sizeof(char), WORK_BUFFER_SIZE, fp)) > 0)
       pdf_add_stream(fstream, work_buffer, nb_read);
     MFCLOSE(fp);
+    RELEASE(fullname);
     break;
   case STRING_STREAM:
     fstream = pdf_new_stream(STREAM_COMPRESS);
