diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-07-16 09:48:23 -0400 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-07-16 09:48:23 -0400 |
commit | db7bff1babdb556efa54b7ff02d66fb50e833a30 (patch) | |
tree | fc436d46a35ce503234aa20d60349795f8d28408 /source3/libsmb | |
parent | deac1761f0695053dec3557e06be5d53e7d189e2 (diff) | |
parent | ddc0d9deb32082a5d8d591800d638d0e96fa6ff3 (diff) | |
download | samba-db7bff1babdb556efa54b7ff02d66fb50e833a30.tar.gz samba-db7bff1babdb556efa54b7ff02d66fb50e833a30.tar.bz2 samba-db7bff1babdb556efa54b7ff02d66fb50e833a30.zip |
Merge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into v3-3-test
(This used to be commit 11d74fc51c637b8129304b5de85bbe02a86a69ce)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clirap2.c | 7 | ||||
-rw-r--r-- | source3/libsmb/libsmb_context.c | 19 |
2 files changed, 24 insertions, 2 deletions
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c index 9cc8110576..a15fa5f7d8 100644 --- a/source3/libsmb/clirap2.c +++ b/source3/libsmb/clirap2.c @@ -1856,6 +1856,7 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char +WORDSIZE]; /* buffer size? */ char upperbuf[MAX(RAP_USERNAME_LEN,RAP_MACHNAME_LEN)]; int res = -1; + char *tmp = NULL; memset(param, 0, sizeof(param)); @@ -1866,11 +1867,13 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char PUTDWORD(p, 0); /* Null pointer */ strlcpy(upperbuf, user, sizeof(upperbuf)); strupper_m(upperbuf); - PUTSTRINGF(p, upperbuf, RAP_USERNAME_LEN); + tmp = upperbuf; + PUTSTRINGF(p, tmp, RAP_USERNAME_LEN); p++; /* strange format, but ok */ strlcpy(upperbuf, workstation, sizeof(upperbuf)); strupper_m(upperbuf); - PUTSTRINGF(p, upperbuf, RAP_MACHNAME_LEN); + tmp = upperbuf; + PUTSTRINGF(p, tmp, RAP_MACHNAME_LEN); PUTWORD(p, CLI_BUFFER_SIZE); PUTWORD(p, CLI_BUFFER_SIZE); diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index b9b74fe7d2..be26a92ca9 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -200,6 +200,22 @@ smbc_free_context(SMBCCTX *context, smbc_setUser(context, NULL); DEBUG(3, ("Context %p successfully freed\n", context)); + + gfree_names(); + gfree_loadparm(); + gfree_case_tables(); + gfree_charcnv(); + gfree_interfaces(); + + gencache_shutdown(); + secrets_shutdown(); + + /* release the talloc null_context memory last */ + talloc_disable_null_tracking(); + + gfree_debugsyms(); + + SAFE_FREE(context->internal); SAFE_FREE(context); return 0; } @@ -411,6 +427,9 @@ smbc_init_context(SMBCCTX *context) char *user = NULL; char *home = NULL; + /* track talloc null_context memory */ + talloc_enable_null_tracking(); + if (!context) { errno = EBADF; return NULL; |