summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-02 20:50:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:22 -0500
commitdada62cf82f82c8a7eec053e2b0d29ec32293160 (patch)
treecabc2c7403413c8b80acde703f70d91e61f64b7f /source3/smbd
parent311cf22a2e028d560000da0645abd3625d1cbd3d (diff)
downloadsamba-dada62cf82f82c8a7eec053e2b0d29ec32293160.tar.gz
samba-dada62cf82f82c8a7eec053e2b0d29ec32293160.tar.bz2
samba-dada62cf82f82c8a7eec053e2b0d29ec32293160.zip
r8948: Fix valgrind bad free bug found by Gunther.
Jeremy. (This used to be commit ff291f4c97b76fb3e9b71a07752ca68c23011273)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/msdfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index d0438b01af..e66c13ab93 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -128,10 +128,14 @@ static BOOL parse_processed_dfs_path(char* pathname, struct dfs_path* pdp, BOOL
static BOOL create_conn_struct( connection_struct *conn, int snum, char *path)
{
+ pstring connpath;
+
ZERO_STRUCTP(conn);
conn->service = snum;
- conn->connectpath = path;
- pstring_sub(conn->connectpath , "%S", lp_servicename(snum));
+ pstrcpy(connpath, path);
+ pstring_sub(connpath , "%S", lp_servicename(snum));
+
+ string_set(&conn->connectpath, connpath);
/* needed for smbd_vfs_init() */