Code

rrd_freemem has to be exported as well ...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 8 Jun 2008 16:47:22 +0000 (16:47 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 8 Jun 2008 16:47:22 +0000 (16:47 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1411 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/bindings/python/rrdtoolmodule.c
program/bindings/ruby/main.c
program/src/librrd.sym

index b3caf192871881dc8d437e2a4cda207c7cb5cfe1..109d66f3194d7b0c5c45a57d96559631dcdf31f4 100644 (file)
@@ -219,9 +219,9 @@ static PyObject *PyRRD_fetch(
         }
 
         for (i = 0; i < ds_cnt; i++)
-            free(ds_namv[i]);
-        free(ds_namv);  /* rrdtool don't use PyMem_Malloc :) */
-        free(data);
+            rrd_freemem(ds_namv[i]);
+        rrd_freemem(ds_namv);  /* rrdtool don't use PyMem_Malloc :) */
+        rrd_freemem(data);
     }
 
     destroy_args(&argv);
@@ -282,9 +282,9 @@ static PyObject *PyRRD_graph(
                 t = PyString_FromString(calcpr[i]);
                 PyList_Append(e, t);
                 Py_DECREF(t);
-                free(calcpr[i]);
+                rrd_freemem(calcpr[i]);
             }
-            free(calcpr);
+            rrd_freemem(calcpr);
         } else {
             Py_INCREF(Py_None);
             PyTuple_SET_ITEM(r, 2, Py_None);
index 353aa4def19a4ecab74577aec6e18f601d907bcc..ec74668300e32f396a144898d7cccc0e7c200a5f 100644 (file)
@@ -171,18 +171,18 @@ VALUE rb_rrd_infocall(
             break;
         case RD_I_STR:
             rb_hash_aset(result, key, rb_str_new2(data->value.u_str));
-            free(data->value.u_str);
+            rrd_freemem(data->value.u_str);
             break;
         case RD_I_BLO:
             rb_hash_aset(result, key,
                          rb_str_new(data->value.u_blo.ptr,
                                     data->value.u_blo.size));
-            free(data->value.u_blo.ptr);
+            rrd_freemem(data->value.u_blo.ptr);
             break;
         }
         p = data;
         data = data->next;
-        free(p);
+        rrd_freemem(p);
     }
     return result;
 }
@@ -232,9 +232,9 @@ VALUE rb_rrd_fetch(
 
     for (i = 0; i < ds_cnt; i++) {
         rb_ary_push(names, rb_str_new2(raw_names[i]));
-        free(raw_names[i]);
+        rrd_freemem(raw_names[i]);
     }
-    free(raw_names);
+    rrd_freemem(raw_names);
 
     k = 0;
     data = rb_ary_new();
@@ -247,7 +247,7 @@ VALUE rb_rrd_fetch(
         }
         rb_ary_push(data, line);
     }
-    free(raw_data);
+    rrd_freemem(raw_data);
 
     result = rb_ary_new2(5);
     rb_ary_store(result, 0, INT2NUM(start));
@@ -279,9 +279,9 @@ VALUE rb_rrd_graph(
     p = calcpr;
     for (p = calcpr; p && *p; p++) {
         rb_ary_push(print_results, rb_str_new2(*p));
-        free(*p);
+        rrd_freemem(*p);
     }
-    free(calcpr);
+    rrd_freemem(calcpr);
     rb_ary_store(result, 0, print_results);
     rb_ary_store(result, 1, INT2FIX(xsize));
     rb_ary_store(result, 2, INT2FIX(ysize));
index 0e29bf04dabad897f47b08e59b8382ffc4d04ad4..7e3e8dacf9f9891d83b58a20ea25cbb6655190fe 100644 (file)
@@ -8,6 +8,7 @@ rrd_fetch_r
 rrd_first
 rrd_first_r
 rrd_free_context
+rrd_freemem
 rrd_get_context
 rrd_get_error
 rrd_graph