File: bibtexmodule.c
Function: bib_open_file
Error: dereferencing NULL (ret->obj) at bibtexmodule.c:144
117 static PyObject *
118 bib_open_file (PyObject * self, PyObject * args)
119 {
120     char * name;
121     BibtexSource * file;
122     gint strictness;
123 
124     PyBibtexSource_Object * ret;
125 
126     if (! PyArg_ParseTuple(args, "si", & name, & strictness))
when PyArg_ParseTuple() succeeds
taking False path
127 	return NULL;
128 
129     file = bibtex_source_new ();
130 
131     /* set the strictness */
132     file->strict = strictness;
when treating unknown struct BibtexSource * from bibtexmodule.c:129 as non-NULL
133 
134     if (! bibtex_source_file (file, name)) {
when considering range: -0x80000000 <= value <= -1
taking False path
135 	bibtex_source_destroy (file, TRUE);
136 	return NULL;
137     }
138 
139     /* Create a new object */
140     ret = (PyBibtexSource_Object *) 
when PyObject_Init() fails
141 	PyObject_NEW (PyBibtexSource_Object, & PyBibtexSource_Type);
142     ret->obj = file;
dereferencing NULL (ret->obj) at bibtexmodule.c:144
found 1 similar trace(s) to this
143 
144     return (PyObject *) ret;
145 }

File: bibtexmodule.c
Function: bib_open_file
Error: returning (PyObject*)NULL without setting an exception
117 static PyObject *
118 bib_open_file (PyObject * self, PyObject * args)
119 {
120     char * name;
121     BibtexSource * file;
122     gint strictness;
123 
124     PyBibtexSource_Object * ret;
125 
126     if (! PyArg_ParseTuple(args, "si", & name, & strictness))
when PyArg_ParseTuple() succeeds
taking False path
127 	return NULL;
128 
129     file = bibtex_source_new ();
130 
131     /* set the strictness */
132     file->strict = strictness;
when treating unknown struct BibtexSource * from bibtexmodule.c:129 as non-NULL
133 
134     if (! bibtex_source_file (file, name)) {
when considering value == (gboolean)0 from bibtexmodule.c:134
taking True path
135 	bibtex_source_destroy (file, TRUE);
136 	return NULL;
137     }
138 
139     /* Create a new object */
140     ret = (PyBibtexSource_Object *) 
141 	PyObject_NEW (PyBibtexSource_Object, & PyBibtexSource_Type);
142     ret->obj = file;
143 
144     return (PyObject *) ret;
145 }
returning (PyObject*)NULL without setting an exception