From 1dfb91adffc315294a948f3cae24a87a3f3d0d89 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 21 Dec 2010 19:12:53 +0300 Subject: ppp: don't free chan_buf/unit_buf if they are null --- accel-pptpd/ppp/ppp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'accel-pptpd') diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c index 79c90a3..e37f658 100644 --- a/accel-pptpd/ppp/ppp.c +++ b/accel-pptpd/ppp/ppp.c @@ -66,9 +66,10 @@ void __export ppp_init(struct ppp_t *ppp) static void _free_ppp(struct ppp_t *ppp) { - _free(ppp->chan_buf); - _free(ppp->unit_buf); - + if (ppp->chan_buf) + free(ppp->chan_buf); + if (ppp->unit_buf) + _free(ppp->unit_buf); if (ppp->username) _free(ppp->username); } -- cgit v1.2.3