Skip to content

Commit

Permalink
More memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
romanbsd committed Apr 13, 2012
1 parent 15f9d4e commit 91a7076
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/statsd.c
Expand Up @@ -611,7 +611,6 @@ void process_stats_packet(char buf_in[]) {
if (token == NULL) { break; }
if (i == 1) {
syslog(LOG_DEBUG, "Found token '%s', key name\n", token);
key_name = malloc( strlen(token) + 1);
key_name = strdup( token );
sanitize_key(key_name);
/* break; */
Expand Down Expand Up @@ -656,7 +655,6 @@ void process_stats_packet(char buf_in[]) {
case 3:
syslog(LOG_DEBUG, "case 3");
if (subtoken == NULL) { break ; }
s_sample_rate = malloc(strlen(subtoken) + 1);
s_sample_rate = strdup(subtoken);
break;
}
Expand Down Expand Up @@ -1008,7 +1006,6 @@ void p_thread_flush(void *ptr) {
k = malloc(strlen(s_counter->key) + strlen(ganglia_metric_prefix) + 1);
sprintf(k, "%s%s", ganglia_metric_prefix, s_counter->key);
} else {
k = malloc(strlen(s_counter->key) + 1);
k = strdup(s_counter->key);
}
SEND_GMETRIC_DOUBLE(k, k, value, "count");
Expand Down

0 comments on commit 91a7076

Please sign in to comment.