summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7982b87ffc..4a2fffc757 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4163,12 +4163,11 @@ void lp_remove_service(int snum)
void lp_copy_service(int snum, const char *new_name)
{
- char *oldname = lp_servicename(snum);
do_section(new_name);
if (snum >= 0) {
snum = lp_servicenumber(new_name);
if (snum >= 0)
- lp_do_parameter(snum, "copy", oldname);
+ lp_do_parameter(snum, "copy", lp_servicename(snum));
}
}