diff options
author | Derrell Lipman <derrell@samba.org> | 2005-12-06 17:09:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:44 -0500 |
commit | 44293df2aeaeccb1e2cca18bb7d61534a5e07b1a (patch) | |
tree | d72999c8185bddd4193b606354538459ae76c7bb /source3/libsmb | |
parent | a2bac34183ce003a194f741c62e69d6674516b07 (diff) | |
download | samba-44293df2aeaeccb1e2cca18bb7d61534a5e07b1a.tar.gz samba-44293df2aeaeccb1e2cca18bb7d61534a5e07b1a.tar.bz2 samba-44293df2aeaeccb1e2cca18bb7d61534a5e07b1a.zip |
r12098: r10797@cabra: derrell | 2005-12-06 12:09:00 -0500
fixed another memory leak and reverted an (incorrect) fix from yesterday
(This used to be commit 8a86d7bddc291da094d060fbe185f071ffdbddd8)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 9fda48a540..e6906eb79a 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -483,6 +483,8 @@ int smbc_remove_unused_server(SMBCCTX * context, SMBCSRV * srv) DEBUG(3, ("smbc_remove_usused_server: %p removed.\n", srv)); context->callbacks.remove_cached_srv_fn(context, srv); + + SAFE_FREE(srv); return 0; } @@ -822,9 +824,9 @@ SMBCSRV *smbc_attr_server(SMBCCTX *context, SMBCSRV *ipc_srv=NULL; /* - * See if we've already created this special connection. Reference our - * "special" share name '*IPC$', which is an impossible real share name - * due to the leading asterisk. + * See if we've already created this special connection. Reference + * our "special" share name '*IPC$', which is an impossible real share + * name due to the leading asterisk. */ ipc_srv = find_server(context, server, "*IPC$", workgroup, username, password); @@ -2386,9 +2388,11 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) /* Now, list the stuff ... */ - if (!cli_NetServerEnum(&srv->cli, workgroup, SV_TYPE_DOMAIN_ENUM, list_unique_wg_fn, + if (!cli_NetServerEnum(&srv->cli, + workgroup, + SV_TYPE_DOMAIN_ENUM, + list_unique_wg_fn, (void *)dir)) { - if (dir) { SAFE_FREE(dir->fname); SAFE_FREE(dir); |