Commit 8fd0f424 authored by Romain Francoise's avatar Romain Francoise

(gethomedir): Use xstrdup.

parent f8f10777
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
......
......@@ -315,7 +315,7 @@ gethomedir ()
}
if (ptr == NULL)
return strcpy ((char *) malloc (2), "/");
return xstrdup ("/");
copy = (char *) malloc (strlen (ptr) + 2);
strcpy (copy, ptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment