diff options
author | Jeremy Allison <jra@samba.org> | 2005-08-02 23:24:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:22 -0500 |
commit | abb81cfe2688dec69fe154d3abff8eff388c779c (patch) | |
tree | afc2dc7b0aaaa50622c9daed1c7c96eb6301c9da /source3/rpc_server | |
parent | 4ff44ae90e59d305bb765c88327a3d3292bafb35 (diff) | |
download | samba-abb81cfe2688dec69fe154d3abff8eff388c779c.tar.gz samba-abb81cfe2688dec69fe154d3abff8eff388c779c.tar.bz2 samba-abb81cfe2688dec69fe154d3abff8eff388c779c.zip |
r8959: Make msdfs code talloc based. Fix leaks.
Jeremy.
(This used to be commit 076023df8ea7c0f03baf8102e55d347e05542c7b)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_dfs_nt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c index b005192010..f61348ee05 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -69,7 +69,7 @@ WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u) pstrcat(altpath, sharename); /* The following call can change the cwd. */ - if(get_referred_path(dfspath, &jn, NULL, NULL)) { + if(get_referred_path(p->mem_ctx, dfspath, &jn, NULL, NULL)) { exists = True; jn.referral_count += 1; old_referral_list = jn.referral_list; @@ -87,7 +87,6 @@ WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u) if(old_referral_list) { memcpy(jn.referral_list, old_referral_list, sizeof(struct referral)*jn.referral_count-1); - SAFE_FREE(old_referral_list); } jn.referral_list[jn.referral_count-1].proximity = 0; @@ -140,7 +139,7 @@ WERROR _dfs_remove(pipes_struct *p, DFS_Q_DFS_REMOVE *q_u, DEBUG(5,("init_reply_dfs_remove: Request to remove %s -> %s\\%s.\n", dfspath, servername, sharename)); - if(!get_referred_path(dfspath, &jn, NULL, NULL)) { + if(!get_referred_path(p->mem_ctx, dfspath, &jn, NULL, NULL)) { return WERR_DFS_NO_SUCH_VOL; } @@ -358,7 +357,7 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, return WERR_DFS_NO_SUCH_SERVER; /* The following call can change the cwd. */ - if(!get_referred_path(path, &jn, &consumedcnt, NULL) || consumedcnt < strlen(path)) { + if(!get_referred_path(p->mem_ctx, path, &jn, &consumedcnt, NULL) || consumedcnt < strlen(path)) { vfs_ChDir(p->conn,p->conn->connectpath); return WERR_DFS_NO_SUCH_VOL; } |