}
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;
}