summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1287bb0)
raw | patch | inline | side by side (parent: 1287bb0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 18 May 2009 14:23:23 +0000 (14:23 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 18 May 2009 14:23:23 +0000 (14:23 +0000) |
bindings/python/rrdtoolmodule.c | patch | blob | history |
index 6cc22ad632eabaf17dbaad6f8040f3ac3960db3c..85f63c7eabb56deb6dbbfda79e5aba72a472b70d 100644 (file)
}
if (val) {
PyDict_SetItemString(r, data->key, val);
+ Py_DECREF(val);
}
data = data->next;
}
if ((data = rrd_info(argc, argv)) == NULL) {
PyErr_SetString(ErrorObject, rrd_get_error());
rrd_clear_error();
- return NULL;
+ r = NULL;
+ } else {
+ r = PyDict_FromInfo(data);
+ rrd_info_free(data);
}
- r = PyDict_FromInfo(data);
- rrd_info_free(data);
+
+ destroy_args(&argv);
return r;
}
if ((data = rrd_graph_v(argc, argv)) == NULL) {
PyErr_SetString(ErrorObject, rrd_get_error());
rrd_clear_error();
- return NULL;
+ r = NULL;
+ } else {
+ r = PyDict_FromInfo(data);
+ rrd_info_free(data);
}
- r = PyDict_FromInfo(data);
- rrd_info_free(data);
+
+ destroy_args(&argv);
return r;
}
if ((data = rrd_update_v(argc, argv)) == NULL) {
PyErr_SetString(ErrorObject, rrd_get_error());
rrd_clear_error();
- return NULL;
+ r = NULL;
+ } else {
+ r = PyDict_FromInfo(data);
+ rrd_info_free(data);
}
- r = PyDict_FromInfo(data);
- rrd_info_free(data);
+
+ destroy_args(&argv);
return r;
}