Skip to content
Snippets Groups Projects
Commit 8523cb35 authored by Christian Göttsche's avatar Christian Göttsche Committed by Kamil Dudka
Browse files

logrotate.c: fix wrong memory allocation, caused by previous spelling

found by clang's scan-build

Closes #149
parent d6a03a94
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -248,7 +248,7 @@ static int allocateHash(unsigned int hs)
}
 
for (i = 0; i < hs; i++) {
states[i] = malloc(sizeof(struct logState));
states[i] = malloc(sizeof(sizeof states[i]));
if (states[i] == NULL) {
message(MESS_ERROR, "could not allocate memory for "
"hash element\n");
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment