From 63d83be5925bcefc64275be5ccb2312596bf5ce8 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Tue, 25 Oct 2016 22:33:10 +0530 Subject: swrap: Fix use-after-free This was introduced by commit 9ce583b6cd6f55d473e5b54794fb06450997ebc8 Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Andreas Schneider --- src/socket_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { -- cgit