File: adnsmodule.c
Function: ADNS_Query_wait
Error: returning (PyObject*)NULL without setting an exception
814 static PyObject *
815 ADNS_Query_wait(
816 	ADNS_Queryobject *self,
817 	PyObject *args
818 	)
819 {
820 	adns_answer *answer_r;
821 	int r;
822 	PyObject *o2=(PyObject *)self;
823 
824 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
825 		return NULL;
826 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:826 as non-NULL
taking True path
827 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
828 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
829 		return NULL;
830 	}
831 	if (self->answer) goto ret_answer;
832 	if (!(self->query)) {
833 		PyErr_SetString(ErrorObject, "query invalidated");
834 		return NULL;
835 	}
836 	Py_BEGIN_ALLOW_THREADS;
837 	r = adns_wait(self->s->state, &self->query, &answer_r, (void *) &o2);
838 	Py_END_ALLOW_THREADS;
839 	if (r) {
840 		if (r == EWOULDBLOCK)
841 			PyErr_SetString(NotReadyError, strerror(r));
842 		else {
843 			PyErr_SetString(ErrorObject, strerror(r));
844 			self->query = NULL;
845 		}
846 		return NULL;
847 	}
848 	assert(o2 == (PyObject *) self);
849 	self->answer = interpret_answer(answer_r);
850 	self->query = NULL;
851 	free(answer_r);
852   ret_answer:
853 	Py_INCREF(self->answer);
854 	return self->answer;
855 }
returning (PyObject*)NULL without setting an exception

File: adnsmodule.c
Function: ADNS_Query_wait
Error: ob_refcnt of return value is 1 too high
814 static PyObject *
815 ADNS_Query_wait(
816 	ADNS_Queryobject *self,
817 	PyObject *args
818 	)
819 {
820 	adns_answer *answer_r;
821 	int r;
822 	PyObject *o2=(PyObject *)self;
823 
824 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
825 		return NULL;
826 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:826 as NULL
taking False path
827 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
828 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
829 		return NULL;
830 	}
831 	if (self->answer) goto ret_answer;
when treating unknown struct PyObject * from adnsmodule.c:831 as NULL
taking False path
832 	if (!(self->query)) {
when treating unknown struct adns__query * from adnsmodule.c:832 as non-NULL
taking False path
833 		PyErr_SetString(ErrorObject, "query invalidated");
834 		return NULL;
835 	}
836 	Py_BEGIN_ALLOW_THREADS;
releasing the GIL by calling PyEval_SaveThread()
837 	r = adns_wait(self->s->state, &self->query, &answer_r, (void *) &o2);
when treating unknown struct ADNS_Stateobject * from adnsmodule.c:837 as non-NULL
838 	Py_END_ALLOW_THREADS;
reacquiring the GIL by calling PyEval_RestoreThread()
839 	if (r) {
when considering value == (int)0 from adnsmodule.c:837
taking False path
840 		if (r == EWOULDBLOCK)
841 			PyErr_SetString(NotReadyError, strerror(r));
842 		else {
843 			PyErr_SetString(ErrorObject, strerror(r));
844 			self->query = NULL;
845 		}
846 		return NULL;
847 	}
848 	assert(o2 == (PyObject *) self);
849 	self->answer = interpret_answer(answer_r);
when interpret_answer() succeeds
new ref from (unknown) interpret_answer allocated at: 	self->answer = interpret_answer(answer_r);
ob_refcnt is now refs: 1 + N where N >= 0
850 	self->query = NULL;
851 	free(answer_r);
852   ret_answer:
853 	Py_INCREF(self->answer);
ob_refcnt is now refs: 2 + N where N >= 0
854 	return self->answer;
855 }
ob_refcnt of return value is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: return value
but final ob_refcnt is N + 2

File: adnsmodule.c
Function: ADNS_Query_wait
Error: dereferencing NULL (D.11845->ob_refcnt) at adnsmodule.c:853
814 static PyObject *
815 ADNS_Query_wait(
816 	ADNS_Queryobject *self,
817 	PyObject *args
818 	)
819 {
820 	adns_answer *answer_r;
821 	int r;
822 	PyObject *o2=(PyObject *)self;
823 
824 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
825 		return NULL;
826 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:826 as NULL
taking False path
827 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
828 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
829 		return NULL;
830 	}
831 	if (self->answer) goto ret_answer;
when treating unknown struct PyObject * from adnsmodule.c:831 as NULL
taking False path
832 	if (!(self->query)) {
when treating unknown struct adns__query * from adnsmodule.c:832 as non-NULL
taking False path
833 		PyErr_SetString(ErrorObject, "query invalidated");
834 		return NULL;
835 	}
836 	Py_BEGIN_ALLOW_THREADS;
releasing the GIL by calling PyEval_SaveThread()
837 	r = adns_wait(self->s->state, &self->query, &answer_r, (void *) &o2);
when treating unknown struct ADNS_Stateobject * from adnsmodule.c:837 as non-NULL
838 	Py_END_ALLOW_THREADS;
reacquiring the GIL by calling PyEval_RestoreThread()
839 	if (r) {
when considering value == (int)0 from adnsmodule.c:837
taking False path
840 		if (r == EWOULDBLOCK)
841 			PyErr_SetString(NotReadyError, strerror(r));
842 		else {
843 			PyErr_SetString(ErrorObject, strerror(r));
844 			self->query = NULL;
845 		}
846 		return NULL;
847 	}
848 	assert(o2 == (PyObject *) self);
849 	self->answer = interpret_answer(answer_r);
when interpret_answer() fails
850 	self->query = NULL;
851 	free(answer_r);
852   ret_answer:
853 	Py_INCREF(self->answer);
dereferencing NULL (D.11845->ob_refcnt) at adnsmodule.c:853
854 	return self->answer;
855 }