Hi,

Another replacement of malloc & memset with calloc. This time in dhclient/clparse.c

RCS file: /cvs/src/sbin/dhclient/clparse.c,v
retrieving revision 1.83
diff -u -p -u -r1.83 clparse.c
--- clparse.c   25 Jan 2014 05:21:23 -0000      1.83
+++ clparse.c   22 Apr 2014 20:16:36 -0000
@@ -454,10 +454,9 @@ parse_client_lease_statement(FILE *cfile
                return;
        }

-       lease = malloc(sizeof(struct client_lease));
+       lease = calloc(1, sizeof (struct client_lease));
        if (!lease)
                error("no memory for lease.");
-       memset(lease, 0, sizeof(*lease));
        lease->is_static = is_static;

        do {

Reply via email to