diff --git a/src/counters.c b/src/counters.c index a0e13f93e6..a74f99efb8 100644 --- a/src/counters.c +++ b/src/counters.c @@ -499,9 +499,6 @@ static void SCPerfReleaseCounter(SCPerfCounter *pc) if (pc->cname != NULL) SCFree(pc->cname); - if (pc->tm_name != NULL) - SCFree(pc->tm_name); - SCFree(pc); } @@ -545,8 +542,7 @@ static uint16_t SCPerfRegisterQualifiedCounter(char *cname, char *tm_name, 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; } @@ -567,11 +563,6 @@ static uint16_t SCPerfRegisterQualifiedCounter(char *cname, char *tm_name, 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); @@ -1099,16 +1090,6 @@ static int SCPerfAddToClubbedTMTable(ThreadVars *tv, SCPerfPublicContext *pctx) 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); diff --git a/src/counters.h b/src/counters.h index 30f44d4cfe..527c011be9 100644 --- a/src/counters.h +++ b/src/counters.h @@ -58,8 +58,6 @@ typedef struct SCPerfCounter_ { /* 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;