Actions
Bug #7813
opencppcheck: warnings in counters.c
Affected Versions:
Effort:
Difficulty:
Label:
Description
src/counters.c:1108:13: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory] id->id = counters_global_id++; ^ src/counters.c:1106:26: note: Assuming allocation function fails id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0 id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1108:13: note: Null pointer dereference id->id = counters_global_id++; ^ src/counters.c:1109:13: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory] id->string = pc->name; ^ src/counters.c:1106:26: note: Assuming allocation function fails id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0 id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1109:13: note: Null pointer dereference id->string = pc->name; ^ src/counters.c:1116:19: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory] pc->gid = id->id; ^ src/counters.c:1106:26: note: Assuming allocation function fails id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1106:26: note: Assignment 'id=calloc(1,sizeof(*id))', assigned value is 0 id = SCCalloc(1, sizeof(*id)); ^ src/counters.c:1116:19: note: Null pointer dereference pc->gid = id->id; ^
No data to display
Actions