diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-07-04 17:18:14 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-07-04 17:18:14 +0000 |
commit | 5cff62d6561dc63ef30b57d7ee415e6e1acdfb70 (patch) | |
tree | d414a0afc193123a3a05f044585f25d5d4acc1ba /winsup/cygwin | |
parent | e48947085c4a06bcca55fd18688147414d1125eb (diff) | |
download | newlib-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.zip newlib-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.tar.gz newlib-5cff62d6561dc63ef30b57d7ee415e6e1acdfb70.tar.bz2 |
* fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
memory here. Allow NULL parameter.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6c0e041..15f24ae 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 01e9dae..7970e4b 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; } |