From 5d052c84e148dda30395fb2d14c9441702fa48ff Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sun, 22 Jul 2012 18:00:55 +0200 Subject: [PATCH] dropopts must not free() --- CHANGES | 3 +++ xioopts.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 029841f..8f1d27f 100644 --- a/CHANGES +++ b/CHANGES @@ -82,6 +82,9 @@ corrections: UDP-LISTEN slept 1s after accepting a connection. This is not required. Thanks to Peter Valdemar Morch for reporting this issue + + fixed a bug that could lead to error or socat crash after a client + connection with option retry had been established docu mentions option so-bindtodev but correct name is so-bindtodevice. Thanks to Jim Zimmerman for reporting. diff --git a/xioopts.c b/xioopts.c index e1270d0..b038112 100644 --- a/xioopts.c +++ b/xioopts.c @@ -4153,9 +4153,8 @@ int _xio_openlate(struct single *xfd, struct opt *opts) { int dropopts(struct opt *opts, unsigned int phase) { struct opt *opt; - /*!*/ if (phase == PH_ALL) { - free(opts); + opts[0].desc = ODESC_END; return 0; } opt = opts; while (opt && opt->desc != ODESC_END) {