diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-08-24 22:45:23 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-08-24 22:45:23 +0200 |
commit | 2fc94eee6b51bb1c3ef3b331bdaa987f38927a23 (patch) | |
tree | b91702e32ff4afe034c06362ef59ffbeaf2e0347 /nslcd/cfg.c | |
parent | ec1010ee2149d128104bcd5f40c72bdc66afdc48 (diff) |
fix a problem with uninitialised memory while parsing the tls_ciphers option (r1471 from development)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.7@1516 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/cfg.c')
-rw-r--r-- | nslcd/cfg.c | 12 |
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; } |