aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-31 03:49:25 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-31 03:49:25 +0000
commit79df31c85ab06d24f9443e370160cc9c44b88b93 (patch)
treeb3f92140b9c210485c2c0caad578c844791f3bcb /init.c
parentWindows reliability changes: (diff)
downloadopenvpn-79df31c85ab06d24f9443e370160cc9c44b88b93.tar.xz
svn merge -r 734:737 $SO/trunk/openvpn
Security fixes from 2.0.3 git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@740 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/init.c b/init.c
index 5f1a9bb..d6c13b2 100644
--- a/init.c
+++ b/init.c
@@ -2682,7 +2682,7 @@ inherit_context_child (struct context *dest,
#endif
/* context init */
- init_instance (dest, src->c2.es, CC_USR1_TO_HUP | CC_GC_FREE);
+ init_instance (dest, src->c2.es, CC_NO_CLOSE | CC_USR1_TO_HUP);
if (IS_SIG (dest))
return;
@@ -2756,6 +2756,9 @@ inherit_context_top (struct context *dest,
void
close_context (struct context *c, int sig, unsigned int flags)
{
+ ASSERT (c);
+ ASSERT (c->sig);
+
if (sig >= 0)
c->sig->signal_received = sig;
@@ -2766,7 +2769,8 @@ close_context (struct context *c, int sig, unsigned int flags)
c->sig->signal_received = SIGHUP;
}
- close_instance (c);
+ if (!(flags & CC_NO_CLOSE))
+ close_instance (c);
if (flags & CC_GC_FREE)
context_gc_free (c);