replace malloc() with calloc() calls

This commit is contained in:
Michael Rash
2014-03-15 22:02:57 -04:00
parent 2556433bba
commit 5baf8a3fa9
12 changed files with 32 additions and 34 deletions
+2 -2
View File
@@ -93,9 +93,9 @@ rotate_digest_cache_file(fko_srv_options_t *opts)
log_msg(LOG_INFO, "Rotating digest cache file.");
#if USE_FILE_CACHE
new_file = malloc(strlen(opts->config[CONF_DIGEST_FILE])+5);
new_file = calloc(1, strlen(opts->config[CONF_DIGEST_FILE])+5);
#else
new_file = malloc(strlen(opts->config[CONF_DIGEST_DB_FILE])+5);
new_file = calloc(1, strlen(opts->config[CONF_DIGEST_DB_FILE])+5);
#endif
if(new_file == NULL)