}
/* 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;
}
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;
}
}
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