From 8fd0f424be3d31ff138188b192efb9ff363b6383 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Mon, 10 Apr 2006 11:01:29 +0000 Subject: [PATCH] (gethomedir): Use xstrdup. --- src/ChangeLog | 4 ++++ src/xrdb.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9c7d551ce7f..ab26fb9a4c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-04-10 Romain Francoise + + * xrdb.c (gethomedir): Use xstrdup. + 2006-04-10 Andreas Schwab * xrdb.c (gethomedir): Make sure to always return a pointer that diff --git a/src/xrdb.c b/src/xrdb.c index c95c98efffd..988db614c41 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -315,7 +315,7 @@ gethomedir () } if (ptr == NULL) - return strcpy ((char *) malloc (2), "/"); + return xstrdup ("/"); copy = (char *) malloc (strlen (ptr) + 2); strcpy (copy, ptr); -- 2.39.2