summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_socket.cc4
2 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6c0e04107..15f24ae98 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2002-07-04 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
+ memory here. Allow NULL parameter.
+
+2002-07-04 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler_socket.cc (fhandler_socket::dup): Add missing copy operation
on sun_path.
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;
}