mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
iscsi-scstd: Fix a resource leak in an error path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6376 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -42,8 +42,10 @@ int iscsi_adm_request_listen(void)
|
||||
if ((err = bind(fd, (struct sockaddr *) &addr, sizeof(addr))) < 0)
|
||||
return err;
|
||||
|
||||
if ((err = listen(fd, 32)) < 0)
|
||||
if ((err = listen(fd, 32)) < 0) {
|
||||
close(fd);
|
||||
return err;
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user