diff options
| author | Anoop C S <anoopcs@redhat.com> | 2016-10-25 22:33:10 +0530 |
|---|---|---|
| committer | Michael Adam <obnox@samba.org> | 2016-10-25 23:20:51 +0200 |
| commit | 63d83be5925bcefc64275be5ccb2312596bf5ce8 (patch) | |
| tree | d71f18094f000ebc4bc557b5aed5958e0c6ef9b5 | |
| parent | 85c2d663ec4dc7dc0170df676721e9a63f18fe40 (diff) | |
| download | socket_wrapper-63d83be5925bcefc64275be5ccb2312596bf5ce8.tar.gz socket_wrapper-63d83be5925bcefc64275be5ccb2312596bf5ce8.tar.xz socket_wrapper-63d83be5925bcefc64275be5ccb2312596bf5ce8.zip | |
swrap: Fix use-after-free
This was introduced by commit 9ce583b6cd6f55d473e5b54794fb06450997ebc8
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
| -rw-r--r-- | src/socket_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index d40f8b6..ece5a10 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -1733,7 +1733,7 @@ static void swrap_remove_stale(int fd) SWRAP_DLIST_REMOVE(socket_fds, fi); free(fi); - si = &sockets[fi->si_index]; + si = &sockets[si_index]; si->refcount--; if (si->refcount > 0) { |
