File: clawsmailmodule.c
Function: get_summaryview_selected_message_list
Error: ob_refcnt of '*msg' is 1 too high
363 static PyObject* get_summaryview_selected_message_list(PyObject *self, PyObject *args)
364 {
365   MainWindow *mainwin;
366   GSList *list, *walk;
367   PyObject *result;
368 
369   mainwin = mainwindow_get_mainwindow();
370   if(!mainwin || !mainwin->summaryview) {
371     PyErr_SetString(PyExc_LookupError, "SummaryView not found");
when treating unknown struct MainWindow * from clawsmailmodule.c:370 as non-NULL
taking False path
when treating unknown struct SummaryView * from clawsmailmodule.c:371 as non-NULL
taking False path
372     return NULL;
373   }
374 
375   result = Py_BuildValue("[]");
376   if(!result)
when Py_BuildValue() succeeds
377     return NULL;
taking False path
378 
379   list = summary_get_selected_msg_list(mainwin->summaryview);
380   for(walk = list; walk; walk = walk->next) {
381     PyObject *msg;
when treating unknown struct GSList * from clawsmailmodule.c:380 as non-NULL
taking True path
when treating unknown struct GSList * from clawsmailmodule.c:381 as NULL
taking False path
382     msg = clawsmail_messageinfo_new(walk->data);
383     if(PyList_Append(result, msg) == -1) {
when clawsmail_messageinfo_new() succeeds
new ref from (unknown) clawsmail_messageinfo_new allocated at:     msg = clawsmail_messageinfo_new(walk->data);
ob_refcnt is now refs: 1 + N where N >= 0
384       Py_DECREF(result);
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
ob_refcnt is now refs: 2 + N where N >= 0
'*msg' is now referenced by 1 non-stack value(s): new ref from call to Py_BuildValue.ob_item[0]
385       return NULL;
386     }
387   }
388   g_slist_free(list);
389 
390   return result;
391 }
392 
ob_refcnt of '*msg' is 1 too high was expecting final ob_refcnt to be N + 1 (for some unknown N) due to object being referenced by: new ref from call to Py_BuildValue.ob_item[0] but final ob_refcnt is N + 2 found 2 similar trace(s) to this