Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
SWRAP_DLIST_REMOVE(socket_fds, fi);
- swrap_set_next_free(si, first_free);
- first_free = si_index;
swrap_dec_refcount(si);
free(fi);
unlink(si->un_addr.sun_path);
}
+ swrap_set_next_free(si, first_free);
+ first_free = si_index;
+
out:
SWRAP_UNLOCK_SI(si);
SWRAP_UNLOCK(first_free);
ret = libc_close(fd);
- swrap_set_next_free(si, first_free);
- first_free = si_index;
-
swrap_dec_refcount(si);
free(fi);
unlink(si->un_addr.sun_path);
}
+ swrap_set_next_free(si, first_free);
+ first_free = si_index;
+
out:
SWRAP_UNLOCK_SI(si);
SWRAP_UNLOCK(first_free);