]> code.delx.au - gnu-emacs/blobdiff - src/doprnt.c
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[gnu-emacs] / src / doprnt.c
index 6c43d000522477bff0836205555d44c8de54678d..b8e1b5472689fc35aa7de87e7b9f036c58d3aa08 100644 (file)
@@ -521,7 +521,10 @@ evxprintf (char **buf, ptrdiff_t *bufsize,
       if (nbytes < *bufsize - 1)
        return nbytes;
       if (*buf != nonheapbuf)
-       xfree (*buf);
+       {
+         xfree (*buf);
+         *buf = NULL;
+       }
       *buf = xpalloc (NULL, bufsize, 1, bufsize_max, 1);
     }
 }