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:
commit
a445f48a39
12
src/memory.c
12
src/memory.c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user