summaryrefslogtreecommitdiff
path: root/src/starter/starter.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-10-29 11:11:01 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-10-29 11:11:01 +0000
commit8b80ab5a6950ce6515f477624794defd7531642a (patch)
treeaa8303f3806c5615fbeafc4dc82febe3cd7c24dc /src/starter/starter.c
parentdb67c87db3c9089ea8d2e14f617bf3d9e2af261f (diff)
downloadvyos-strongswan-8b80ab5a6950ce6515f477624794defd7531642a.tar.gz
vyos-strongswan-8b80ab5a6950ce6515f477624794defd7531642a.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.8)
Diffstat (limited to 'src/starter/starter.c')
-rw-r--r--src/starter/starter.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/starter/starter.c b/src/starter/starter.c
index 6ff0ac29c..61f21d88c 100644
--- a/src/starter/starter.c
+++ b/src/starter/starter.c
@@ -11,7 +11,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: starter.c 3914 2008-05-08 10:58:04Z martin $
+ * RCSID $Id: starter.c 4140 2008-07-02 05:51:49Z andreas $
*/
#include <sys/types.h>
@@ -452,7 +452,7 @@ int main (int argc, char **argv)
);
new_cfg = confread_load(CONFIG_FILE);
- if (new_cfg->err + new_cfg->non_fatal_err == 0)
+ if (new_cfg && (new_cfg->err + new_cfg->non_fatal_err == 0))
{
/* Switch to new config. New conn will be loaded below */
if (!starter_cmp_defaultroute(&new_cfg->defaultroute
@@ -546,7 +546,10 @@ int main (int argc, char **argv)
else
{
plog("can't reload config file due to errors -- keeping old one");
- confread_free(new_cfg);
+ if (new_cfg)
+ {
+ confread_free(new_cfg);
+ }
}
_action_ &= ~FLAG_ACTION_UPDATE;
last_reload = time(NULL);