[SCM] Samba Shared Repository - branch v3-4-test updated -
release-4-0-0alpha7-1067-g61cca8a
Volker Lendecke
vlendec at samba.org
Mon May 25 14:19:47 GMT 2009
The branch, v3-4-test has been updated
via 61cca8aa5f5e3ad665c3b1acfab20802dd0f3f3a (commit)
from bfe6186c600470916d73c3d3b17b6dfc27c299bd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test
- Log -----------------------------------------------------------------
commit 61cca8aa5f5e3ad665c3b1acfab20802dd0f3f3a
Author: Slava Semushin <php-coder at altlinux.ru>
Date: Sat May 23 20:51:53 2009 +0700
source{3,4}/torture/smbiconv.c(main): fixed file descriptor leak.
File descriptor leaks only when we use file instead of stdout.
Found by cppcheck:
[./source3/torture/smbiconv.c:219]: (error) Resource leak: out
[./source4/torture/smbiconv.c:211]: (error) Resource leak: out
-----------------------------------------------------------------------
Summary of changes:
source3/torture/smbiconv.c | 1 +
source4/torture/smbiconv.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c
index 72fbdc4..47353d2 100644
--- a/source3/torture/smbiconv.c
+++ b/source3/torture/smbiconv.c
@@ -216,6 +216,7 @@ int main(int argc, char *argv[])
cd = smb_iconv_open(to, from);
if (cd == (smb_iconv_t)-1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
+ if (out != stdout) fclose(out);
return 1;
}
diff --git a/source4/torture/smbiconv.c b/source4/torture/smbiconv.c
index 4eece66..173f371 100644
--- a/source4/torture/smbiconv.c
+++ b/source4/torture/smbiconv.c
@@ -208,6 +208,7 @@ int main(int argc, char *argv[])
cd = smb_iconv_open_ex(tctx, to, from, lp_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true));
if((int)cd == -1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
+ if (out != stdout) fclose(out);
return 1;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list