]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
liblwip: Remove vfscore_put_fd from socket_close
authorSharan Santhanam <sharan.santhanam@neclab.eu>
Mon, 27 May 2019 13:00:33 +0000 (15:00 +0200)
committerFlorian Schmidt <florian.schmidt@neclab.eu>
Wed, 29 May 2019 07:21:32 +0000 (09:21 +0200)
This patch fixes a bug in the function sock_net_close. The close
function frees up a descriptor that was removed by fdrop. The fdrop
function invokes the close callback after it had removed the fd
from its list.

Signed-off-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
Reviewed-by: Florian Schmidt <florian.schmidt@neclab.eu>
sockets.c

index 0cf22de5f49b1227330b1e631b0e72e7ecc61e0a..bbee72b4e5755e82f1f4dbc17630c928f3e026bf 100644 (file)
--- a/sockets.c
+++ b/sockets.c
@@ -169,8 +169,6 @@ static int sock_net_close(struct vnode *s_vnode,
 
        /* Close and release the lwip socket */
        ret = lwip_close(file->sock_fd);
-       /* Release the file descriptor number */
-       vfscore_put_fd(file->vfscore_file.fd);
        /* Free socket vnode */
        uk_free(uk_alloc_get_default(), file->vfscore_file.f_dentry->d_vnode);
        /* Free socket dentry */