summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 3455e29..b3461e3 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixSock.c,v 1.30 2010/10/26 13:59:28 dkf Exp $
+ * RCS: @(#) $Id: tclUnixSock.c,v 1.31 2010/10/28 16:22:37 dgp Exp $
*/
#include "tclInt.h"
@@ -972,8 +972,12 @@ CreateClientSocket(
}
error:
- freeaddrinfo(addrlist);
- freeaddrinfo(myaddrlist);
+ if (addrlist) {
+ freeaddrinfo(addrlist);
+ }
+ if (myaddrlist) {
+ freeaddrinfo(myaddrlist);
+ }
if (status < 0) {
if (interp != NULL) {