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);