if (pc->cname != NULL)
SCFree(pc->cname);
- if (pc->tm_name != NULL)
- SCFree(pc->tm_name);
-
SCFree(pc);
}
while (temp != NULL) {
prev = temp;
- if (strcmp(cname, temp->cname) == 0 &&
- strcmp(tm_name, temp->tm_name) == 0) {
+ if (strcmp(cname, temp->cname) == 0) {
break;
}
exit(EXIT_FAILURE);
}
- if ( (pc->tm_name = SCStrdup(tm_name)) == NULL) {
- SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
- exit(EXIT_FAILURE);
- }
-
/* assign a unique id to this SCPerfCounter. The id is local to this
* PerfContext. Please note that the id start from 1, and not 0 */
pc->id = ++(pctx->curr_id);
return 0;
}
- if (tv->thread_group_name != NULL) {
- temp->tm_name = SCStrdup(tv->thread_group_name);
- if (unlikely(temp->tm_name == NULL)) {
- SCFree(temp->name);
- SCFree(temp);
- SCMutexUnlock(&sc_perf_op_ctx->pctmi_lock);
- return 0;
- }
- }
-
temp->next = sc_perf_op_ctx->pctmi;
sc_perf_op_ctx->pctmi = temp;
SCLogInfo("sc_perf_op_ctx->pctmi %p", sc_perf_op_ctx->pctmi);
/* name of the counter */
char *cname;
- /* name of the thread module this counter is registered to */
- char *tm_name;
/* the next perfcounter for this tv's tm instance */
struct SCPerfCounter_ *next;