mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
- Fixes memory leaks in scst_user spotted by new SGV cache backend
- Version changed on -pre3 - Minor fixes and cosmetics git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+2
-2
@@ -663,9 +663,9 @@ void *main_loop(void *arg)
|
||||
|
||||
vcmd.fd = open_dev_fd(dev);
|
||||
if (vcmd.fd < 0) {
|
||||
res = vcmd.fd;
|
||||
res = -errno;
|
||||
PRINT_ERROR_PR("Unable to open file %s (%s)", dev->file_name,
|
||||
strerror(res));
|
||||
strerror(-res));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -277,9 +277,9 @@ int main(int argc, char **argv)
|
||||
TRACE_DBG("Opening file %s", dev.file_name);
|
||||
fd = open(dev.file_name, O_RDONLY|O_LARGEFILE);
|
||||
if (fd < 0) {
|
||||
res = errno;
|
||||
res = -errno;
|
||||
PRINT_ERROR_PR("Unable to open file %s (%s)", dev.file_name,
|
||||
strerror(res));
|
||||
strerror(-res));
|
||||
goto out_done;
|
||||
}
|
||||
|
||||
@@ -368,9 +368,9 @@ int main(int argc, char **argv)
|
||||
dev.scst_usr_fd = open(DEV_USER_PATH DEV_USER_NAME, O_RDWR |
|
||||
(dev.non_blocking ? O_NONBLOCK : 0));
|
||||
if (dev.scst_usr_fd < 0) {
|
||||
res = dev.scst_usr_fd;
|
||||
res = -errno;
|
||||
PRINT_ERROR_PR("Unable to open SCST device %s (%s)",
|
||||
DEV_USER_PATH DEV_USER_NAME, strerror(res));
|
||||
DEV_USER_PATH DEV_USER_NAME, strerror(-res));
|
||||
goto out_done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user