Hi,

Here's another.


Index: l2tpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tpd.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 l2tpd.c
--- l2tpd.c     22 Mar 2014 04:32:39 -0000      1.14
+++ l2tpd.c     25 Apr 2014 00:09:33 -0000
@@ -162,12 +162,11 @@ l2tpd_add_listener(l2tpd *_this, int idx
                    __func__, slist_length(&_this->listener), idx);
                goto fail;
        }
-       if ((plistener = malloc(sizeof(l2tpd_listener))) == NULL) {
-               l2tpd_log(_this, LOG_ERR, "malloc() failed in %s: %m",
+       if ((plistener = calloc(1, sizeof(l2tpd_listener))) == NULL) {
+               l2tpd_log(_this, LOG_ERR, "calloc() failed in %s: %m",
                    __func__);
                goto fail;
        }
-       memset(plistener, 0, sizeof(l2tpd_listener));
        L2TPD_ASSERT(sizeof(plistener->bind) >= addr->sa_len);
        memcpy(&plistener->bind, addr, addr->sa_len);
 


-- 
Peter Malone <[email protected]>

Reply via email to