Hi,
Another replacement of malloc & memset with calloc. This time in init.c.
Also added a check as non existed prior to this.
Index: init.c
===================================================================
RCS file: /cvs/src/sbin/init/init.c,v
retrieving revision 1.49
diff -u -p -u -r1.49 init.c
--- init.c 3 Jan 2014 22:29:00 -0000 1.49
+++ init.c 22 Apr 2014 19:56:27 -0000
@@ -860,8 +860,11 @@ new_session(session_t *sprev, int sessio
typ->ty_getty == 0)
return (0);
- sp = (session_t *) malloc(sizeof (session_t));
- memset(sp, 0, sizeof *sp);
+ sp = calloc(1, sizeof (session_t));
+ if (sp == NULL) {
+ err(1, "calloc");
+ return (0);
+ }
sp->se_flags = SE_PRESENT;
sp->se_index = session_index;