]> git.eshelyaron.com Git - emacs.git/commitdiff
(gethomedir): Use xstrdup.
authorRomain Francoise <romain@orebokech.com>
Mon, 10 Apr 2006 11:01:29 +0000 (11:01 +0000)
committerRomain Francoise <romain@orebokech.com>
Mon, 10 Apr 2006 11:01:29 +0000 (11:01 +0000)
src/ChangeLog
src/xrdb.c

index 9c7d551ce7f289f7f7fe35095c1c945947f9f8f1..ab26fb9a4c8c33dbfd661a084fe859ede26af84d 100644 (file)
@@ -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
index c95c98efffd8e768df37f0eef58051de6be4962b..988db614c41faad5a8acb80ee8c3507803aaa3d9 100644 (file)
@@ -315,7 +315,7 @@ gethomedir ()
     }
 
   if (ptr == NULL)
-    return strcpy ((char *) malloc (2), "/");
+    return xstrdup ("/");
 
   copy = (char *) malloc (strlen (ptr) + 2);
   strcpy (copy, ptr);