1
mirror of https://github.com/hashcat/hashcat synced 2024-11-24 14:27:14 +01:00

Merge pull request #1379 from neheb/patch-1

Adjust hcmalloc to be the same as calloc
This commit is contained in:
Jens Steube 2017-10-04 12:28:00 +02:00 committed by GitHub
commit a445f48a39

View File

@ -23,16 +23,8 @@ void *hccalloc (const size_t nmemb, const size_t sz)
void *hcmalloc (const size_t sz)
{
void *p = malloc (sz);
if (p == NULL)
{
fprintf (stderr, "%s\n", MSG_ENOMEM);
return (NULL);
}
memset (p, 0, sz);
//calloc is faster than malloc with big allocations, so just use that.
void *p = hccalloc (sz, 1);
return (p);
}