Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd/cfg.c')
-rw-r--r--nslcd/cfg.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/nslcd/cfg.c b/nslcd/cfg.c
index 52a10b8..1653c1a 100644
--- a/nslcd/cfg.c
+++ b/nslcd/cfg.c
@@ -5,7 +5,7 @@
Copyright (C) 1997-2005 Luke Howard
Copyright (C) 2007 West Consulting
- Copyright (C) 2007, 2008, 2009, 2010 Arthur de Jong
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -415,12 +415,10 @@ static void get_restdup(const char *filename,int lnr,
char **var)
{
check_argumentcount(filename,lnr,keyword,(*line!=NULL)&&(**line!='\0'));
- if ((*var==NULL)||(strcmp(*var,*line)!=0))
- {
- /* Note: we have a memory leak here if a single mapping is changed
- multiple times in one config (deemed not a problem) */
- *var=xstrdup(*line);
- }
+ /* Note: we have a memory leak here if a single mapping is changed
+ multiple times in one config (deemed not a problem) */
+ *var=xstrdup(*line);
+ /* mark that we are at the end of the line */
*line=NULL;
}