- 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:
Vladislav Bolkhovitin
2007-09-25 09:52:53 +00:00
parent a61f896dd3
commit 455778bf10
5 changed files with 43 additions and 39 deletions
+2 -2
View File
@@ -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
View File
@@ -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;
}