From: Romain Francoise Date: Mon, 10 Apr 2006 11:01:29 +0000 (+0000) Subject: (gethomedir): Use xstrdup. X-Git-Tag: emacs-pretest-22.0.90~3234 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fd0f424be3d31ff138188b192efb9ff363b6383;p=emacs.git (gethomedir): Use xstrdup. --- 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);