Code

this should help with the memory leak
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 4 Feb 2008 22:16:14 +0000 (22:16 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 4 Feb 2008 22:16:14 +0000 (22:16 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1277 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_update.c

index b3cc86c801ab6c3f51e4eccec24a2df4bf368ca0..01e756d1e9bfe0a9930ac9e13f554cee05318356 100644 (file)
@@ -1963,7 +1963,7 @@ static int write_RRA_row(
                 rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].u_val,
                 rrd_file->pos, rrd->rra_def[rra_idx].cf_nam);
 #endif
-        if (pcdp_summary != NULL) {
+        if (*pcdp_summary != NULL) {
             iv.u_val = rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].u_val;
             /* append info to the return hash */
             *pcdp_summary = info_push(*pcdp_summary,