diff options
author | Jeremy Allison <jra@samba.org> | 2007-03-01 02:43:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:16 -0500 |
commit | 8e00e9d7a6114089fc176bc3446c6c97a01543d6 (patch) | |
tree | 9c5b58be176c12282be1226dd4369cb80a66bb6b /source3/torture | |
parent | fae01b48994fd3168fd921af68dab1b4003adc49 (diff) | |
download | samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.gz samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.bz2 samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.zip |
r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit df07a662e32367a52c1e8473475423db2ff5bc51)
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/torture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 7944494612..5ab28438f2 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -4479,6 +4479,7 @@ static BOOL run_eatest(int dummy) printf("starting eatest\n"); if (!torture_open_connection(&cli, 0)) { + talloc_destroy(mem_ctx); return False; } @@ -4490,6 +4491,7 @@ static BOOL run_eatest(int dummy) if (fnum == -1) { printf("open failed - %s\n", cli_errstr(cli)); + talloc_destroy(mem_ctx); return False; } @@ -4500,6 +4502,7 @@ static BOOL run_eatest(int dummy) memset(ea_val, (char)i+1, i+1); if (!cli_set_ea_fnum(cli, fnum, ea_name, ea_val, i+1)) { printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli)); + talloc_destroy(mem_ctx); return False; } } @@ -4512,6 +4515,7 @@ static BOOL run_eatest(int dummy) memset(ea_val, (char)i+1, i+1); if (!cli_set_ea_path(cli, fname, ea_name, ea_val, i+1)) { printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli)); + talloc_destroy(mem_ctx); return False; } } @@ -4545,6 +4549,7 @@ static BOOL run_eatest(int dummy) slprintf(ea_name, sizeof(ea_name), "ea_%d", i); if (!cli_set_ea_path(cli, fname, ea_name, "", 0)) { printf("ea_set of name %s failed - %s\n", ea_name, cli_errstr(cli)); + talloc_destroy(mem_ctx); return False; } } |