From dada62cf82f82c8a7eec053e2b0d29ec32293160 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Aug 2005 20:50:16 +0000 Subject: r8948: Fix valgrind bad free bug found by Gunther. Jeremy. (This used to be commit ff291f4c97b76fb3e9b71a07752ca68c23011273) --- source3/smbd/msdfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3') 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() */ -- cgit