From 410a4f8d96109c1c3cb5c3049f42a18b05c07ba7 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Wed, 21 Jan 2004 16:47:30 +0000 Subject: [PATCH] - no need for strdup, we never free myconfig - use defconfig for default passwd/lockfile git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@145 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 727097a..a4e8e17 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -192,12 +192,14 @@ create_config () } if (myconfig->max == 0) myconfig->max = defconfig.max; - if (!myconfig->banner) myconfig->banner = strdup(defconfig.banner); - if (!myconfig->chroot) myconfig->chroot = strdup(defconfig.chroot); - if (!myconfig->nethack) myconfig->nethack = strdup(defconfig.nethack); - if (!myconfig->dglroot) myconfig->dglroot = strdup(defconfig.dglroot); - if (!myconfig->rcfile) myconfig->rcfile = strdup(defconfig.rcfile); - if (!myconfig->spool) myconfig->spool = strdup(defconfig.spool); + if (!myconfig->banner) myconfig->banner = defconfig.banner; + if (!myconfig->chroot) myconfig->chroot = defconfig.chroot; + if (!myconfig->nethack) myconfig->nethack = defconfig.nethack; + if (!myconfig->dglroot) myconfig->dglroot = defconfig.dglroot; + if (!myconfig->rcfile) myconfig->rcfile = defconfig.rcfile; + if (!myconfig->spool) myconfig->spool = defconfig.spool; + if (!myconfig->passwd) myconfig->passwd = defconfig.passwd; + if (!myconfig->lockfile) myconfig->lockfile = defconfig.lockfile; } else {