File: adnsmodule.c
Function: ADNS_Query_check
Error: returning (PyObject*)NULL without setting an exception
765 static PyObject *
766 ADNS_Query_check(
767 	ADNS_Queryobject *self,
768 	PyObject *args
769 	)
770 {
771 	adns_answer *answer_r;
772 	int r;
773 	PyObject *o2=(PyObject *)self;
774 
775 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
776 		return NULL;
777 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:777 as non-NULL
taking True path
778 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
779 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
780 		return NULL;
781 	}
782 	if (self->answer) goto ret_answer;
783 	if (!(self->query)) {
784 		PyErr_SetString(ErrorObject, "query invalidated");
785 		return NULL;
786 	}
787 	r = adns_check(self->s->state, &self->query, &answer_r, (void *) &o2);
788 	if (r) {
789 		if (r == EWOULDBLOCK)
790 			PyErr_SetString(NotReadyError, strerror(r));
791 		else {
792 			PyErr_SetString(ErrorObject, strerror(r));
793 			self->query = NULL;
794 		}
795 		return NULL;
796 	}
797 	assert(o2 == (PyObject *) self);
798 	self->answer = interpret_answer(answer_r);
799 	self->query = NULL;
800 	free(answer_r);
801   ret_answer:
802 	Py_INCREF(self->answer);
803 	return self->answer;
804 }
returning (PyObject*)NULL without setting an exception

File: adnsmodule.c
Function: ADNS_Query_check
Error: ob_refcnt of return value is 1 too high
765 static PyObject *
766 ADNS_Query_check(
767 	ADNS_Queryobject *self,
768 	PyObject *args
769 	)
770 {
771 	adns_answer *answer_r;
772 	int r;
773 	PyObject *o2=(PyObject *)self;
774 
775 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
776 		return NULL;
777 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:777 as NULL
taking False path
778 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
779 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
780 		return NULL;
781 	}
782 	if (self->answer) goto ret_answer;
when treating unknown struct PyObject * from adnsmodule.c:782 as NULL
taking False path
783 	if (!(self->query)) {
when treating unknown struct adns__query * from adnsmodule.c:783 as non-NULL
taking False path
784 		PyErr_SetString(ErrorObject, "query invalidated");
785 		return NULL;
786 	}
787 	r = adns_check(self->s->state, &self->query, &answer_r, (void *) &o2);
when treating unknown struct ADNS_Stateobject * from adnsmodule.c:787 as non-NULL
788 	if (r) {
when considering value == (int)0 from adnsmodule.c:787
taking False path
789 		if (r == EWOULDBLOCK)
790 			PyErr_SetString(NotReadyError, strerror(r));
791 		else {
792 			PyErr_SetString(ErrorObject, strerror(r));
793 			self->query = NULL;
794 		}
795 		return NULL;
796 	}
797 	assert(o2 == (PyObject *) self);
798 	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
799 	self->query = NULL;
800 	free(answer_r);
801   ret_answer:
802 	Py_INCREF(self->answer);
ob_refcnt is now refs: 2 + N where N >= 0
803 	return self->answer;
804 }
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_check
Error: dereferencing NULL (D.11880->ob_refcnt) at adnsmodule.c:802
765 static PyObject *
766 ADNS_Query_check(
767 	ADNS_Queryobject *self,
768 	PyObject *args
769 	)
770 {
771 	adns_answer *answer_r;
772 	int r;
773 	PyObject *o2=(PyObject *)self;
774 
775 	if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
776 		return NULL;
777 	if (self->exc_type) {
when treating unknown struct PyObject * from adnsmodule.c:777 as NULL
taking False path
778 		PyErr_Restore(self->exc_type, self->exc_value, self->exc_traceback);
779 		self->exc_type = self->exc_value = self->exc_traceback = NULL;
780 		return NULL;
781 	}
782 	if (self->answer) goto ret_answer;
when treating unknown struct PyObject * from adnsmodule.c:782 as NULL
taking False path
783 	if (!(self->query)) {
when treating unknown struct adns__query * from adnsmodule.c:783 as non-NULL
taking False path
784 		PyErr_SetString(ErrorObject, "query invalidated");
785 		return NULL;
786 	}
787 	r = adns_check(self->s->state, &self->query, &answer_r, (void *) &o2);
when treating unknown struct ADNS_Stateobject * from adnsmodule.c:787 as non-NULL
788 	if (r) {
when considering value == (int)0 from adnsmodule.c:787
taking False path
789 		if (r == EWOULDBLOCK)
790 			PyErr_SetString(NotReadyError, strerror(r));
791 		else {
792 			PyErr_SetString(ErrorObject, strerror(r));
793 			self->query = NULL;
794 		}
795 		return NULL;
796 	}
797 	assert(o2 == (PyObject *) self);
798 	self->answer = interpret_answer(answer_r);
when interpret_answer() fails
799 	self->query = NULL;
800 	free(answer_r);
801   ret_answer:
802 	Py_INCREF(self->answer);
dereferencing NULL (D.11880->ob_refcnt) at adnsmodule.c:802
803 	return self->answer;
804 }