From b96fbc3f966b012720d2b74b1dfd2a0ab95086cf Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 20 Sep 2010 01:09:07 +0400 Subject: fixed many bugs and memory leaks --- accel-pptpd/ppp/lcp_opt_pcomp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'accel-pptpd/ppp/lcp_opt_pcomp.c') diff --git a/accel-pptpd/ppp/lcp_opt_pcomp.c b/accel-pptpd/ppp/lcp_opt_pcomp.c index 8700bf4..0ff4d11 100644 --- a/accel-pptpd/ppp/lcp_opt_pcomp.c +++ b/accel-pptpd/ppp/lcp_opt_pcomp.c @@ -6,6 +6,8 @@ #include "ppp_lcp.h" #include "log.h" +#include "memdebug.h" + static struct lcp_option_t *pcomp_init(struct ppp_lcp_t *lcp); static void pcomp_free(struct ppp_lcp_t *lcp, struct lcp_option_t *opt); static int pcomp_send_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr); @@ -31,7 +33,7 @@ static struct lcp_option_handler_t pcomp_opt_hnd= static struct lcp_option_t *pcomp_init(struct ppp_lcp_t *lcp) { - struct pcomp_option_t *pcomp_opt=malloc(sizeof(*pcomp_opt)); + struct pcomp_option_t *pcomp_opt=_malloc(sizeof(*pcomp_opt)); memset(pcomp_opt,0,sizeof(*pcomp_opt)); pcomp_opt->pcomp=0; pcomp_opt->opt.id=CI_PCOMP; @@ -44,7 +46,7 @@ static void pcomp_free(struct ppp_lcp_t *lcp, struct lcp_option_t *opt) { struct pcomp_option_t *pcomp_opt=container_of(opt,typeof(*pcomp_opt),opt); - free(pcomp_opt); + _free(pcomp_opt); } static int pcomp_send_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, uint8_t *ptr) -- cgit v1.2.3