提交 1dfb91ad 编写于 作者: D Dmitry Kozlov

ppp: don't free chan_buf/unit_buf if they are null

上级 24533bab
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册