File: player.c
Function: player_publish_hand
Error: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
307 /* Show the hand to the player */
308 void player_publish_hand (Player *player)
309 {
310 	GList *l;
311 	PyObject *result;
312 	
313 	PyObject *hand = PyList_New(0);
when PyList_New() succeeds
314 	for (l = player->hand->list; l; l = l->next)
when treating unknown struct Player * from player.c:308 as non-NULL
when treating unknown struct CardsHand * from player.c:314 as non-NULL
when treating unknown struct GList * from player.c:314 as non-NULL
taking True path
when treating unknown struct GList * from player.c:314 as NULL
taking False path
315 	{
316 		Card *card = (Card*)l->data;
317 		PyList_Append(hand, Py_BuildValue("(ii)", card->suit, card->rank));
when treating unknown void * from player.c:316 as non-NULL
when Py_BuildValue() succeeds
when PyList_Append() succeeds
new ref from call to Py_BuildValue allocated at: 		PyList_Append(hand, Py_BuildValue("(ii)", card->suit, card->rank));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
new ref from call to Py_BuildValue is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
318 	} 
319 	
320 	result = PyObject_CallMethod(player->ai, "set_hand", "O", hand);
when PyObject_CallMethod() succeeds
321 	if (PyErr_Occurred())
PyErr_Occurred()
taking False path
322 	{
323 		PyErr_Print();
324 		g_assert_not_reached();
325 	}
326 	Py_DECREF(hand);
when taking True path
327 	Py_DECREF(result);
when taking True path
328 }
returning
ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PyListObject.ob_item[0]
but final ob_refcnt is N + 2
found 3 similar trace(s) to this

File: player.c
Function: player_publish_hand
Error: calling PyList_Append with NULL as argument 1 (hand) at player.c:317
307 /* Show the hand to the player */
308 void player_publish_hand (Player *player)
309 {
310 	GList *l;
311 	PyObject *result;
312 	
313 	PyObject *hand = PyList_New(0);
when PyList_New() fails
314 	for (l = player->hand->list; l; l = l->next)
when treating unknown struct Player * from player.c:308 as non-NULL
when treating unknown struct CardsHand * from player.c:314 as non-NULL
when treating unknown struct GList * from player.c:314 as non-NULL
taking True path
315 	{
316 		Card *card = (Card*)l->data;
317 		PyList_Append(hand, Py_BuildValue("(ii)", card->suit, card->rank));
when treating unknown void * from player.c:316 as non-NULL
when Py_BuildValue() succeeds
calling PyList_Append with NULL as argument 1 (hand) at player.c:317
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
318 	} 
319 	
320 	result = PyObject_CallMethod(player->ai, "set_hand", "O", hand);
321 	if (PyErr_Occurred())
322 	{
323 		PyErr_Print();
324 		g_assert_not_reached();
325 	}
326 	Py_DECREF(hand);
327 	Py_DECREF(result);
328 }