changeset 69913:eddb3cab7138

(gethomedir): Use xstrdup.
author Romain Francoise <romain@orebokech.com>
date Mon, 10 Apr 2006 11:01:29 +0000
parents 7ac0100a3441
children ef1d39034359
files src/ChangeLog src/xrdb.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Apr 10 09:33:40 2006 +0000
+++ b/src/ChangeLog	Mon Apr 10 11:01:29 2006 +0000
@@ -1,3 +1,7 @@
+2006-04-10  Romain Francoise  <romain@orebokech.com>
+
+	* xrdb.c (gethomedir): Use xstrdup.
+
 2006-04-10  Andreas Schwab  <schwab@suse.de>
 
 	* xrdb.c (gethomedir): Make sure to always return a pointer that
--- a/src/xrdb.c	Mon Apr 10 09:33:40 2006 +0000
+++ b/src/xrdb.c	Mon Apr 10 11:01:29 2006 +0000
@@ -315,7 +315,7 @@
     }
 
   if (ptr == NULL)
-    return strcpy ((char *) malloc (2), "/");
+    return xstrdup ("/");
 
   copy = (char *) malloc (strlen (ptr) + 2);
   strcpy (copy, ptr);