summaryrefslogtreecommitdiff
path: root/source3/smbd/service.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-07-23 14:51:34 +0930
committerAndrew Bartlett <abartlet@samba.org>2012-08-07 23:20:05 +1000
commit3bb65aa159cae310b2a5d4998c258d72ace2fa3f (patch)
treeaba74ca94c57eea63ec56cee2912c0bb9585fc9c /source3/smbd/service.c
parenta14c02d2a7b9d070a6338a360103a34e7673454c (diff)
downloadsamba-3bb65aa159cae310b2a5d4998c258d72ace2fa3f.tar.gz
samba-3bb65aa159cae310b2a5d4998c258d72ace2fa3f.tar.bz2
samba-3bb65aa159cae310b2a5d4998c258d72ace2fa3f.zip
source3/smbd/conn.c: wean off string_set/string_free
Use straight talloc strings. This is the only user outside loadparm.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r--source3/smbd/service.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index a1d009cb44..4fc1aa3e2d 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -61,7 +61,7 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
}
/* Allocate for strlen + '\0' + possible leading '/' */
- destname = (char *)SMB_MALLOC(strlen(connectpath) + 2);
+ destname = (char *)talloc_size(conn, strlen(connectpath) + 2);
if (!destname) {
return false;
}
@@ -162,8 +162,8 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
DEBUG(10,("set_conn_connectpath: service %s, connectpath = %s\n",
lp_servicename(talloc_tos(), SNUM(conn)), destname ));
- string_set(&conn->connectpath, destname);
- SAFE_FREE(destname);
+ talloc_free(conn->connectpath);
+ conn->connectpath = destname;
return true;
}
@@ -867,7 +867,8 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
}
conn->base_share_dev = smb_fname_cpath->st.st_ex_dev;
- string_set(&conn->origpath,conn->connectpath);
+ talloc_free(conn->origpath);
+ conn->origpath = talloc_strdup(conn, conn->connectpath);
/* Figure out the characteristics of the underlying filesystem. This
* assumes that all the filesystem mounted withing a share path have