File: | rrdtoolmodule.c |
Function: | _rrdtool_xport |
Error: | memory leak: ob_refcnt of '*meta_dict' is 1 too high |
694 static PyObject *
695 _rrdtool_xport(PyObject *Py_UNUSED(self), PyObject *args)
696 {
697 char **rrdtool_argv = NULL;
698 int rrdtool_argc = 0;
699 PyObject *ret;
700 int xsize, status;
701 char **legend_v;
702 time_t start, end;
703 unsigned long step, col_cnt;
704 rrd_value_t *data, *datai;
705
706 if (convert_args("xport", args, &rrdtool_argv, &rrdtool_argc) == -1)
when considering range: -0x80000000 <= value <= -2
taking False path
707 return NULL;
708
709 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
710 status = rrd_xport(rrdtool_argc, rrdtool_argv, &xsize, &start, &end, &step,
711 &col_cnt, &legend_v, &data);
712 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
713
714 if (status == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
715 PyErr_SetString(rrdtool_OperationalError, rrd_get_error());
716 rrd_clear_error();
717 ret = NULL;
718 } else {
719 PyObject *meta_dict, *data_list, *legend_list, *t;
720 rrd_value_t dv;
721 unsigned long i, j, row_cnt = (end - start) / step;
722
723 ret = PyDict_New();
when PyDict_New() succeeds
724 meta_dict = PyDict_New();
when PyDict_New() succeeds
'*meta_dict' was allocated at: meta_dict = PyDict_New();
ob_refcnt is now refs: 1 owned
725 legend_list = PyList_New(col_cnt);
when PyList_New() succeeds
726 data_list = PyList_New(row_cnt);
when PyList_New() succeeds
727
728 PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
ob_refcnt is now refs: 1 owned, 1 borrowed
729 PyDict_SetItem(ret, PyRRD_String_FromString("data"), data_list);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
730
731 datai = data;
732
733 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
734 PyRRD_String_FromString("start"),
735 PyRRD_Int_FromLong((long) start));
736 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
737 PyRRD_String_FromString("end"),
738 PyRRD_Int_FromLong((long) end));
739 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
740 PyRRD_String_FromString("step"),
741 PyRRD_Int_FromLong((long) step));
742 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
743 PyRRD_String_FromString("rows"),
744 PyRRD_Int_FromLong((long) row_cnt));
745 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
746 PyRRD_String_FromString("columns"),
747 PyRRD_Int_FromLong((long) col_cnt));
748 PyDict_SetItem(meta_dict,
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
749 PyRRD_String_FromString("legend"),
750 legend_list);
751
752 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
753 PyList_SET_ITEM(legend_list, i, PyRRD_String_FromString(legend_v[i]));
when treating unknown char * * from rrdtoolmodule.c:753 as non-NULL
when PyUnicode_FromString() succeeds
754
755 for (i = 0; i < row_cnt; i++) {
when considering range: 1 <= row_cnt <= 0xffffffffffffffff
taking True path
when considering row_cnt == (long unsigned int)1 from rrdtoolmodule.c:721
taking False path
756 t = PyTuple_New(col_cnt);
when PyTuple_New() succeeds
757 PyList_SET_ITEM(data_list, i, t);
758
759 for (j = 0; j < col_cnt; j++) {
when taking True path
when taking False path
760 dv = *(datai++);
when treating unknown rrd_value_t * * from rrdtoolmodule.c:710 as non-NULL
761
762 if (isnan(dv)) {
when taking False path
763 PyTuple_SET_ITEM(t, j, Py_None);
764 Py_INCREF(Py_None);
765 } else {
766 PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv));
when PyFloat_FromDouble() succeeds
767 }
768 }
769 }
770
771 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
772 rrd_freemem(legend_v[i]);
when treating unknown char * * from rrdtoolmodule.c:772 as non-NULL
773
774 rrd_freemem(legend_v);
775 rrd_freemem(data);
776 }
777
778 destroy_args(&rrdtool_argv);
779
780 return ret;
781 }
File: | rrdtoolmodule.c |
Function: | _rrdtool_xport |
Error: | memory leak: ob_refcnt of '*legend_list' is 1 too high |
694 static PyObject *
695 _rrdtool_xport(PyObject *Py_UNUSED(self), PyObject *args)
696 {
697 char **rrdtool_argv = NULL;
698 int rrdtool_argc = 0;
699 PyObject *ret;
700 int xsize, status;
701 char **legend_v;
702 time_t start, end;
703 unsigned long step, col_cnt;
704 rrd_value_t *data, *datai;
705
706 if (convert_args("xport", args, &rrdtool_argv, &rrdtool_argc) == -1)
when considering range: -0x80000000 <= value <= -2
taking False path
707 return NULL;
708
709 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
710 status = rrd_xport(rrdtool_argc, rrdtool_argv, &xsize, &start, &end, &step,
711 &col_cnt, &legend_v, &data);
712 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
713
714 if (status == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
715 PyErr_SetString(rrdtool_OperationalError, rrd_get_error());
716 rrd_clear_error();
717 ret = NULL;
718 } else {
719 PyObject *meta_dict, *data_list, *legend_list, *t;
720 rrd_value_t dv;
721 unsigned long i, j, row_cnt = (end - start) / step;
722
723 ret = PyDict_New();
when PyDict_New() succeeds
724 meta_dict = PyDict_New();
when PyDict_New() succeeds
725 legend_list = PyList_New(col_cnt);
when PyList_New() succeeds
'*legend_list' was allocated at: legend_list = PyList_New(col_cnt);
ob_refcnt is now refs: 1 owned
726 data_list = PyList_New(row_cnt);
when PyList_New() succeeds
727
728 PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
729 PyDict_SetItem(ret, PyRRD_String_FromString("data"), data_list);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
730
731 datai = data;
732
733 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
734 PyRRD_String_FromString("start"),
735 PyRRD_Int_FromLong((long) start));
736 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
737 PyRRD_String_FromString("end"),
738 PyRRD_Int_FromLong((long) end));
739 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
740 PyRRD_String_FromString("step"),
741 PyRRD_Int_FromLong((long) step));
742 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
743 PyRRD_String_FromString("rows"),
744 PyRRD_Int_FromLong((long) row_cnt));
745 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
746 PyRRD_String_FromString("columns"),
747 PyRRD_Int_FromLong((long) col_cnt));
748 PyDict_SetItem(meta_dict,
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
ob_refcnt is now refs: 1 owned, 1 borrowed
749 PyRRD_String_FromString("legend"),
750 legend_list);
751
752 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
753 PyList_SET_ITEM(legend_list, i, PyRRD_String_FromString(legend_v[i]));
when treating unknown char * * from rrdtoolmodule.c:753 as non-NULL
when PyUnicode_FromString() succeeds
754
755 for (i = 0; i < row_cnt; i++) {
when considering range: 1 <= row_cnt <= 0xffffffffffffffff
taking True path
when considering row_cnt == (long unsigned int)1 from rrdtoolmodule.c:721
taking False path
756 t = PyTuple_New(col_cnt);
when PyTuple_New() succeeds
757 PyList_SET_ITEM(data_list, i, t);
758
759 for (j = 0; j < col_cnt; j++) {
when taking True path
when taking False path
760 dv = *(datai++);
when treating unknown rrd_value_t * * from rrdtoolmodule.c:710 as non-NULL
761
762 if (isnan(dv)) {
when taking False path
763 PyTuple_SET_ITEM(t, j, Py_None);
764 Py_INCREF(Py_None);
765 } else {
766 PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv));
when PyFloat_FromDouble() succeeds
767 }
768 }
769 }
770
771 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
772 rrd_freemem(legend_v[i]);
when treating unknown char * * from rrdtoolmodule.c:772 as non-NULL
773
774 rrd_freemem(legend_v);
775 rrd_freemem(data);
776 }
777
778 destroy_args(&rrdtool_argv);
779
780 return ret;
781 }
File: | rrdtoolmodule.c |
Function: | _rrdtool_xport |
Error: | memory leak: ob_refcnt of '*data_list' is 1 too high |
694 static PyObject *
695 _rrdtool_xport(PyObject *Py_UNUSED(self), PyObject *args)
696 {
697 char **rrdtool_argv = NULL;
698 int rrdtool_argc = 0;
699 PyObject *ret;
700 int xsize, status;
701 char **legend_v;
702 time_t start, end;
703 unsigned long step, col_cnt;
704 rrd_value_t *data, *datai;
705
706 if (convert_args("xport", args, &rrdtool_argv, &rrdtool_argc) == -1)
when considering range: -0x80000000 <= value <= -2
taking False path
707 return NULL;
708
709 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
710 status = rrd_xport(rrdtool_argc, rrdtool_argv, &xsize, &start, &end, &step,
711 &col_cnt, &legend_v, &data);
712 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
713
714 if (status == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
715 PyErr_SetString(rrdtool_OperationalError, rrd_get_error());
716 rrd_clear_error();
717 ret = NULL;
718 } else {
719 PyObject *meta_dict, *data_list, *legend_list, *t;
720 rrd_value_t dv;
721 unsigned long i, j, row_cnt = (end - start) / step;
722
723 ret = PyDict_New();
when PyDict_New() succeeds
724 meta_dict = PyDict_New();
when PyDict_New() succeeds
725 legend_list = PyList_New(col_cnt);
when PyList_New() succeeds
726 data_list = PyList_New(row_cnt);
when PyList_New() succeeds
'*data_list' was allocated at: data_list = PyList_New(row_cnt);
ob_refcnt is now refs: 1 owned
727
728 PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
729 PyDict_SetItem(ret, PyRRD_String_FromString("data"), data_list);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
ob_refcnt is now refs: 1 owned, 1 borrowed
730
731 datai = data;
732
733 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
734 PyRRD_String_FromString("start"),
735 PyRRD_Int_FromLong((long) start));
736 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
737 PyRRD_String_FromString("end"),
738 PyRRD_Int_FromLong((long) end));
739 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
740 PyRRD_String_FromString("step"),
741 PyRRD_Int_FromLong((long) step));
742 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
743 PyRRD_String_FromString("rows"),
744 PyRRD_Int_FromLong((long) row_cnt));
745 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
746 PyRRD_String_FromString("columns"),
747 PyRRD_Int_FromLong((long) col_cnt));
748 PyDict_SetItem(meta_dict,
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
749 PyRRD_String_FromString("legend"),
750 legend_list);
751
752 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
753 PyList_SET_ITEM(legend_list, i, PyRRD_String_FromString(legend_v[i]));
when treating unknown char * * from rrdtoolmodule.c:753 as non-NULL
when PyUnicode_FromString() succeeds
754
755 for (i = 0; i < row_cnt; i++) {
when considering range: 1 <= row_cnt <= 0xffffffffffffffff
taking True path
when considering row_cnt == (long unsigned int)1 from rrdtoolmodule.c:721
taking False path
756 t = PyTuple_New(col_cnt);
when PyTuple_New() succeeds
757 PyList_SET_ITEM(data_list, i, t);
758
759 for (j = 0; j < col_cnt; j++) {
when taking True path
when taking False path
760 dv = *(datai++);
when treating unknown rrd_value_t * * from rrdtoolmodule.c:710 as non-NULL
761
762 if (isnan(dv)) {
when taking False path
763 PyTuple_SET_ITEM(t, j, Py_None);
764 Py_INCREF(Py_None);
765 } else {
766 PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv));
when PyFloat_FromDouble() succeeds
767 }
768 }
769 }
770
771 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
772 rrd_freemem(legend_v[i]);
when treating unknown char * * from rrdtoolmodule.c:772 as non-NULL
773
774 rrd_freemem(legend_v);
775 rrd_freemem(data);
776 }
777
778 destroy_args(&rrdtool_argv);
779
780 return ret;
781 }
File: | rrdtoolmodule.c |
Function: | _rrdtool_xport |
Error: | memory leak: ob_refcnt of new ref from (unknown) PyUnicode_FromString is 1 too high |
694 static PyObject *
695 _rrdtool_xport(PyObject *Py_UNUSED(self), PyObject *args)
696 {
697 char **rrdtool_argv = NULL;
698 int rrdtool_argc = 0;
699 PyObject *ret;
700 int xsize, status;
701 char **legend_v;
702 time_t start, end;
703 unsigned long step, col_cnt;
704 rrd_value_t *data, *datai;
705
706 if (convert_args("xport", args, &rrdtool_argv, &rrdtool_argc) == -1)
when considering range: -0x80000000 <= value <= -2
taking False path
707 return NULL;
708
709 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
710 status = rrd_xport(rrdtool_argc, rrdtool_argv, &xsize, &start, &end, &step,
711 &col_cnt, &legend_v, &data);
712 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
713
714 if (status == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
715 PyErr_SetString(rrdtool_OperationalError, rrd_get_error());
716 rrd_clear_error();
717 ret = NULL;
718 } else {
719 PyObject *meta_dict, *data_list, *legend_list, *t;
720 rrd_value_t dv;
721 unsigned long i, j, row_cnt = (end - start) / step;
722
723 ret = PyDict_New();
when PyDict_New() succeeds
724 meta_dict = PyDict_New();
when PyDict_New() succeeds
725 legend_list = PyList_New(col_cnt);
when PyList_New() succeeds
726 data_list = PyList_New(row_cnt);
when PyList_New() succeeds
727
728 PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
new ref from (unknown) PyUnicode_FromString was allocated at: PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
ob_refcnt is now refs: 1 owned
729 PyDict_SetItem(ret, PyRRD_String_FromString("data"), data_list);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
730
731 datai = data;
732
733 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
734 PyRRD_String_FromString("start"),
735 PyRRD_Int_FromLong((long) start));
736 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
737 PyRRD_String_FromString("end"),
738 PyRRD_Int_FromLong((long) end));
739 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
740 PyRRD_String_FromString("step"),
741 PyRRD_Int_FromLong((long) step));
742 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
743 PyRRD_String_FromString("rows"),
744 PyRRD_Int_FromLong((long) row_cnt));
745 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
746 PyRRD_String_FromString("columns"),
747 PyRRD_Int_FromLong((long) col_cnt));
748 PyDict_SetItem(meta_dict,
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
749 PyRRD_String_FromString("legend"),
750 legend_list);
751
752 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
753 PyList_SET_ITEM(legend_list, i, PyRRD_String_FromString(legend_v[i]));
when treating unknown char * * from rrdtoolmodule.c:753 as non-NULL
when PyUnicode_FromString() succeeds
754
755 for (i = 0; i < row_cnt; i++) {
when considering range: 1 <= row_cnt <= 0xffffffffffffffff
taking True path
when considering row_cnt == (long unsigned int)1 from rrdtoolmodule.c:721
taking False path
756 t = PyTuple_New(col_cnt);
when PyTuple_New() succeeds
757 PyList_SET_ITEM(data_list, i, t);
758
759 for (j = 0; j < col_cnt; j++) {
when taking True path
when taking False path
760 dv = *(datai++);
when treating unknown rrd_value_t * * from rrdtoolmodule.c:710 as non-NULL
761
762 if (isnan(dv)) {
when taking False path
763 PyTuple_SET_ITEM(t, j, Py_None);
764 Py_INCREF(Py_None);
765 } else {
766 PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv));
when PyFloat_FromDouble() succeeds
767 }
768 }
769 }
770
771 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
772 rrd_freemem(legend_v[i]);
when treating unknown char * * from rrdtoolmodule.c:772 as non-NULL
773
774 rrd_freemem(legend_v);
775 rrd_freemem(data);
776 }
777
778 destroy_args(&rrdtool_argv);
779
780 return ret;
781 }
File: | rrdtoolmodule.c |
Function: | _rrdtool_xport |
Error: | memory leak: ob_refcnt of PyLongObject is 1 too high |
694 static PyObject *
695 _rrdtool_xport(PyObject *Py_UNUSED(self), PyObject *args)
696 {
697 char **rrdtool_argv = NULL;
698 int rrdtool_argc = 0;
699 PyObject *ret;
700 int xsize, status;
701 char **legend_v;
702 time_t start, end;
703 unsigned long step, col_cnt;
704 rrd_value_t *data, *datai;
705
706 if (convert_args("xport", args, &rrdtool_argv, &rrdtool_argc) == -1)
when considering range: -0x80000000 <= value <= -2
taking False path
707 return NULL;
708
709 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
710 status = rrd_xport(rrdtool_argc, rrdtool_argv, &xsize, &start, &end, &step,
711 &col_cnt, &legend_v, &data);
712 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
713
714 if (status == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
715 PyErr_SetString(rrdtool_OperationalError, rrd_get_error());
716 rrd_clear_error();
717 ret = NULL;
718 } else {
719 PyObject *meta_dict, *data_list, *legend_list, *t;
720 rrd_value_t dv;
721 unsigned long i, j, row_cnt = (end - start) / step;
722
723 ret = PyDict_New();
when PyDict_New() succeeds
724 meta_dict = PyDict_New();
when PyDict_New() succeeds
725 legend_list = PyList_New(col_cnt);
when PyList_New() succeeds
726 data_list = PyList_New(row_cnt);
when PyList_New() succeeds
727
728 PyDict_SetItem(ret, PyRRD_String_FromString("meta"), meta_dict);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
729 PyDict_SetItem(ret, PyRRD_String_FromString("data"), data_list);
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
730
731 datai = data;
732
733 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
PyLongObject was allocated at: PyDict_SetItem(meta_dict,
ob_refcnt is now refs: 1 owned
ob_refcnt is now refs: 1 owned, 1 borrowed
734 PyRRD_String_FromString("start"),
735 PyRRD_Int_FromLong((long) start));
736 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
737 PyRRD_String_FromString("end"),
738 PyRRD_Int_FromLong((long) end));
739 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
740 PyRRD_String_FromString("step"),
741 PyRRD_Int_FromLong((long) step));
742 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
743 PyRRD_String_FromString("rows"),
744 PyRRD_Int_FromLong((long) row_cnt));
745 PyDict_SetItem(meta_dict,
when PyLong_FromLong() succeeds
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
746 PyRRD_String_FromString("columns"),
747 PyRRD_Int_FromLong((long) col_cnt));
748 PyDict_SetItem(meta_dict,
when PyUnicode_FromString() succeeds
when PyDict_SetItem() succeeds
749 PyRRD_String_FromString("legend"),
750 legend_list);
751
752 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
753 PyList_SET_ITEM(legend_list, i, PyRRD_String_FromString(legend_v[i]));
when treating unknown char * * from rrdtoolmodule.c:753 as non-NULL
when PyUnicode_FromString() succeeds
754
755 for (i = 0; i < row_cnt; i++) {
when considering range: 1 <= row_cnt <= 0xffffffffffffffff
taking True path
when considering row_cnt == (long unsigned int)1 from rrdtoolmodule.c:721
taking False path
756 t = PyTuple_New(col_cnt);
when PyTuple_New() succeeds
757 PyList_SET_ITEM(data_list, i, t);
758
759 for (j = 0; j < col_cnt; j++) {
when taking True path
when taking False path
760 dv = *(datai++);
when treating unknown rrd_value_t * * from rrdtoolmodule.c:710 as non-NULL
761
762 if (isnan(dv)) {
when taking False path
763 PyTuple_SET_ITEM(t, j, Py_None);
764 Py_INCREF(Py_None);
765 } else {
766 PyTuple_SET_ITEM(t, j, PyFloat_FromDouble((double) dv));
when PyFloat_FromDouble() succeeds
767 }
768 }
769 }
770
771 for (i = 0; i < col_cnt; i++)
when taking True path
when taking False path
772 rrd_freemem(legend_v[i]);
when treating unknown char * * from rrdtoolmodule.c:772 as non-NULL
773
774 rrd_freemem(legend_v);
775 rrd_freemem(data);
776 }
777
778 destroy_args(&rrdtool_argv);
779
780 return ret;
781 }