In nflog_nflog_setcb(), after 'Py_XINCREF(temp)', 'temp' has a refcount of 2.
But the refcount of 'nflog_py_cb', to which 'temp' is later assigned, is only decremented once.
Thus, the PyObjects created will never be freed.
I suggest to remove 'Py_XINCREF(temp)' to resolve this (tested and works for me).