summaryrefslogtreecommitdiffstats
path: root/source3/smbd/conn.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/conn.c
parenta14c02d2a7b9d070a6338a360103a34e7673454c (diff)
downloadsamba-3bb65aa159cae310b2a5d4998c258d72ace2fa3f.tar.gz
samba-3bb65aa159cae310b2a5d4998c258d72ace2fa3f.tar.xz
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/conn.c')
-rw-r--r--source3/smbd/conn.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 28e1850b450..bc5a03b4eb0 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -62,7 +62,9 @@ connection_struct *conn_new(struct smbd_server_connection *sconn)
connection_struct *conn;
if (!(conn=talloc_zero(NULL, connection_struct)) ||
- !(conn->params = talloc(conn, struct share_params))) {
+ !(conn->params = talloc(conn, struct share_params)) ||
+ !(conn->connectpath = talloc_strdup(conn, "")) ||
+ !(conn->origpath = talloc_strdup(conn, ""))) {
DEBUG(0,("TALLOC_ZERO() failed!\n"));
TALLOC_FREE(conn);
return NULL;
@@ -70,9 +72,6 @@ connection_struct *conn_new(struct smbd_server_connection *sconn)
conn->sconn = sconn;
conn->force_group_gid = (gid_t)-1;
- string_set(&conn->connectpath,"");
- string_set(&conn->origpath,"");
-
DLIST_ADD(sconn->connections, conn);
sconn->num_connections++;
@@ -171,9 +170,6 @@ static void conn_free_internal(connection_struct *conn)
free_namearray(conn->veto_oplock_list);
free_namearray(conn->aio_write_behind_list);
- string_free(&conn->connectpath);
- string_free(&conn->origpath);
-
ZERO_STRUCTP(conn);
talloc_destroy(conn);
}