Changeset 454 for trunk/src/samhain.c
- Timestamp:
- Jun 29, 2014, 7:30:04 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r433 r454 150 150 int sh_g_thread() 151 151 { 152 struct gt * ptr = malloc(sizeof(struct gt));152 struct gt * ptr = calloc(1,sizeof(struct gt)); 153 153 if (!ptr) 154 154 return -1; … … 640 640 /* The struct to hold privileged information. 641 641 */ 642 skey = (sh_key_t *) malloc (sizeof(sh_key_t));642 skey = calloc(1,sizeof(sh_key_t)); 643 643 if (skey != NULL) 644 644 { … … 862 862 SH_MUTEX_LOCK(mutex_readdir); 863 863 864 pidlist = malloc(sizeof(pid_t) * 65535);864 pidlist = calloc(1, sizeof(pid_t) * 65535); 865 865 if (!pidlist) 866 866 goto unlock_and_out; … … 1376 1376 if (tzlen < 1024) 1377 1377 { 1378 sh.timezone = malloc (tzlen + 1);1378 sh.timezone = calloc(1, tzlen + 1); 1379 1379 if (sh.timezone != NULL) 1380 1380 (void) sl_strlcpy (sh.timezone, tzptr, tzlen + 1);
Note:
See TracChangeset
for help on using the changeset viewer.