Index: rtsold.c
===================================================================
RCS file: /cvs/src/usr.sbin/rtsold/rtsold.c,v
retrieving revision 1.50
diff -u -p -r1.50 rtsold.c
--- rtsold.c    21 Oct 2013 08:46:07 -0000      1.50
+++ rtsold.c    11 Jun 2014 17:28:11 -0000
@@ -324,12 +324,11 @@ ifconfig(char *ifname)
                return(-1);
        }
 
-       if ((ifinfo = malloc(sizeof(*ifinfo))) == NULL) {
+       if ((ifinfo = calloc(1, sizeof(*ifinfo))) == NULL) {
                warnmsg(LOG_ERR, __func__, "memory allocation failed");
                free(sdl);
                return(-1);
        }
-       memset(ifinfo, 0, sizeof(*ifinfo));
        ifinfo->sdl = sdl;
 
        strncpy(ifinfo->ifname, ifname, sizeof(ifinfo->ifname));

Reply via email to