summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_socket.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-07-04 17:18:14 +0000
committerCorinna Vinschen <corinna@vinschen.de>2002-07-04 17:18:14 +0000
commit5cff62d6561dc63ef30b57d7ee415e6e1acdfb70 (patch)
treed414a0afc193123a3a05f044585f25d5d4acc1ba /winsup/cygwin/fhandler_socket.cc
parente48947085c4a06bcca55fd18688147414d1125eb (diff)
downloadcygnal-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.tar.gz
cygnal-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.tar.bz2
cygnal-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.zip
* fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
memory here. Allow NULL parameter.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 01e9daead..7970e4b63 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -1141,7 +1141,5 @@ fhandler_socket::set_close_on_exec (int val)
void
fhandler_socket::set_sun_path (const char *path)
{
- if (sun_path)
- cfree (sun_path);
- sun_path = cstrdup (path);
+ sun_path = path ? cstrdup (path) : NULL;
}