File: clawsmailmodule.c
Function: get_folder_tree_from_account_name
Error: ob_refcnt of '*root.25' is 1 too high
175 static PyObject* get_folder_tree_from_account_name(const char *str)
176 {
177   PyObject *result;
178   GList *walk;
179 
180   result = Py_BuildValue("[]");
181   if(!result)
when Py_BuildValue() succeeds
182     return NULL;
taking False path
183 
184   for(walk = folder_get_list(); walk; walk = walk->next) {
185     Folder *folder = walk->data;
when treating unknown struct GList * from clawsmailmodule.c:185 as non-NULL
taking True path
186     if((!str || !g_strcmp0(str, folder->name)) && folder->node) {
187       PyObject *root;
when taking True path
when treating unknown void * from clawsmailmodule.c:186 as non-NULL
when treating unknown struct GNode * from clawsmailmodule.c:187 as non-NULL
taking True path
188       int n_children, i_child, retval;
189 
190       /* create root nodes */
191       root = clawsmail_node_new(cm_module);
192       if(!root) {
when clawsmail_node_new() succeeds
new ref from (unknown) clawsmail_node_new allocated at:       root = clawsmail_node_new(cm_module);
ob_refcnt is now refs: 1 + N where N >= 0
193         Py_DECREF(result);
taking False path
194         return NULL;
195       }
196 
197       n_children = g_node_n_children(folder->node);
198       for(i_child = 0; i_child < n_children; i_child++) {
199         if(!setup_folderitem_node(g_node_nth_child(folder->node, i_child), folder->node, &root)) {
when considering range: 1 <= value <= 0xffffffff
taking True path
200           Py_DECREF(root);
when considering value == (gboolean)0 from clawsmailmodule.c:200
taking True path
201           Py_DECREF(result);
when treating unknown struct PyObject * * from clawsmailmodule.c:200 as non-NULL
when considering range: -0x8000000000000000 <= value <= -1
taking True path
202           return NULL;
when taking True path
203         }
204       }
205       retval = PyList_Append(result, root);
206       Py_DECREF(root);
207       if(retval == -1) {
208         Py_DECREF(result);
209         return NULL;
210       }
211     }
212   }
213   return result;
214 }
215 
ob_refcnt of '*root.25' is 1 too high was expecting final ob_refcnt to be N + 0 (for some unknown N) but final ob_refcnt is N + 1 found 11 similar trace(s) to this

File: clawsmailmodule.c
Function: get_folder_tree_from_account_name
Error: returning (PyObject*)NULL without setting an exception
175 static PyObject* get_folder_tree_from_account_name(const char *str)
176 {
177   PyObject *result;
178   GList *walk;
179 
180   result = Py_BuildValue("[]");
181   if(!result)
when Py_BuildValue() succeeds
182     return NULL;
taking False path
183 
184   for(walk = folder_get_list(); walk; walk = walk->next) {
185     Folder *folder = walk->data;
when treating unknown struct GList * from clawsmailmodule.c:185 as non-NULL
taking True path
186     if((!str || !g_strcmp0(str, folder->name)) && folder->node) {
187       PyObject *root;
when taking True path
when treating unknown void * from clawsmailmodule.c:186 as non-NULL
when treating unknown struct GNode * from clawsmailmodule.c:187 as non-NULL
taking True path
188       int n_children, i_child, retval;
189 
190       /* create root nodes */
191       root = clawsmail_node_new(cm_module);
192       if(!root) {
when clawsmail_node_new() succeeds
193         Py_DECREF(result);
taking False path
194         return NULL;
195       }
196 
197       n_children = g_node_n_children(folder->node);
198       for(i_child = 0; i_child < n_children; i_child++) {
199         if(!setup_folderitem_node(g_node_nth_child(folder->node, i_child), folder->node, &root)) {
when considering range: 1 <= value <= 0xffffffff
taking True path
200           Py_DECREF(root);
when considering value == (gboolean)0 from clawsmailmodule.c:200
taking True path
201           Py_DECREF(result);
when treating unknown struct PyObject * * from clawsmailmodule.c:200 as non-NULL
when considering range: -0x8000000000000000 <= value <= -1
taking True path
202           return NULL;
when taking True path
203         }
204       }
205       retval = PyList_Append(result, root);
206       Py_DECREF(root);
207       if(retval == -1) {
208         Py_DECREF(result);
209         return NULL;
210       }
211     }
212   }
213   return result;
214 }
215 
returning (PyObject*)NULL without setting an exception found 3 similar trace(s) to this