]> Pileus Git - ~andy/fetchmail/blobdiff - xmalloc.c
Lots of bug resolutions.
[~andy/fetchmail] / xmalloc.c
index ed0b88e73fc68464c51ea17e6a46eab3f22cedcf..2b343fe48558c6a075e548d34e63e5ba6aa1ab53 100644 (file)
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -28,7 +28,10 @@ xmalloc (int n)
 
     p = (XMALLOCTYPE *) malloc(n);
     if (p == (XMALLOCTYPE *) 0)
-       error(PS_UNDEFINED, errno, _("malloc failed"));
+    {
+       report(stderr, _("malloc failed\n"));
+       exit(PS_UNDEFINED);
+    }
     return(p);
 }
 
@@ -39,7 +42,10 @@ xrealloc (XMALLOCTYPE *p, int n)
        return xmalloc (n);
     p = (XMALLOCTYPE *) realloc(p, n);
     if (p == (XMALLOCTYPE *) 0)
-       error(PS_UNDEFINED, errno, _("realloc failed"));
+    {
+       report(stderr, _("realloc failed\n"));
+       exit(PS_UNDEFINED);
+    }
     return p;
 }