]> arthur.barton.de Git - netdata.git/commitdiff
solved a duplicate memory allocation in the new API
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Nov 2015 23:29:43 +0000 (01:29 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Nov 2015 23:29:43 +0000 (01:29 +0200)
src/rrd2json.c

index 339b75220177295368e088887b78a52c683cf8a5..4d2fe3af40596ae8753b402eb6608079613a7ed9 100755 (executable)
@@ -802,9 +802,6 @@ static RRDR *rrdr_create(RRDSET *st, int n)
        r->t = malloc(n * sizeof(time_t));
        if(unlikely(!r->t)) goto cleanup;
 
-       r->t = malloc(n * sizeof(time_t));
-       if(unlikely(!r->t)) goto cleanup;
-
        r->v = malloc(n * r->d * sizeof(calculated_number));
        if(unlikely(!r->v)) goto cleanup;