summaryrefslogtreecommitdiff
path: root/libmisc/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmisc/xmalloc.c')
-rw-r--r--libmisc/xmalloc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmisc/xmalloc.c b/libmisc/xmalloc.c
index 41a3343c..6d686145 100644
--- a/libmisc/xmalloc.c
+++ b/libmisc/xmalloc.c
@@ -54,7 +54,7 @@
ptr = (char *) malloc (size);
if (NULL == ptr) {
- (void) fprintf (stderr,
+ (void) fprintf (shadow_logfd,
_("%s: failed to allocate memory: %s\n"),
Prog, strerror (errno));
exit (13);
@@ -66,3 +66,10 @@
{
return strcpy (xmalloc (strlen (str) + 1), str);
}
+
+void xfree(void *ap)
+{
+ if (ap) {
+ free(ap);
+ }
+}