diff options
author | 2014-07-08 18:49:27 +0000 | |
---|---|---|
committer | 2014-07-08 18:49:27 +0000 | |
commit | 230b2897db74b8bde6530b3ad07be88b551fa3f8 (patch) | |
tree | 3b77e674bea4d1d089cf2196935da5c67fdbb842 | |
parent | remove use of internally-deprecated OPENSSL_malloc/free (diff) | |
download | wireguard-openbsd-230b2897db74b8bde6530b3ad07be88b551fa3f8.tar.xz wireguard-openbsd-230b2897db74b8bde6530b3ad07be88b551fa3f8.zip |
Fix npppd not to access freed memory when it is exiting.
-rw-r--r-- | usr.sbin/npppd/npppd/npppd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/npppd/npppd/npppd.c b/usr.sbin/npppd/npppd/npppd.c index 3fa9f3ee430..fbaafba937c 100644 --- a/usr.sbin/npppd/npppd/npppd.c +++ b/usr.sbin/npppd/npppd/npppd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd.c,v 1.35 2014/03/22 04:30:31 yasuoka Exp $ */ +/* $OpenBSD: npppd.c,v 1.36 2014/07/08 18:49:27 yasuoka Exp $ */ /*- * Copyright (c) 2005-2008,2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * Next pppd(nppd). This file provides a npppd daemon process and operations * for npppd instance. * @author Yasuoka Masahiko - * $Id: npppd.c,v 1.35 2014/03/22 04:30:31 yasuoka Exp $ + * $Id: npppd.c,v 1.36 2014/07/08 18:49:27 yasuoka Exp $ */ #include "version.h" #include <sys/types.h> @@ -1746,8 +1746,10 @@ npppd_set_radish(npppd *_this, void *radish_head) slist_fini(&rtlist0); slist_fini(&rtlist1); - if (_this->rd != NULL) + if (_this->rd != NULL) { npppd_rd_walktree_delete(_this->rd); + _this->rd = NULL; + } if (radish_head == NULL) npppd_get_all_users(_this, &delppp); |