File: | bibtexmodule.c |
Function: | bib_open_string |
Error: | dereferencing NULL (ret->obj) at bibtexmodule.c:174 |
147 static PyObject *
148 bib_open_string (PyObject * self, PyObject * args)
149 {
150 char * name, * string;
151 BibtexSource * file;
152 gint strictness;
153
154 PyBibtexSource_Object * ret;
155
156 if (! PyArg_ParseTuple(args, "ssi", & name, & string, & strictness))
when PyArg_ParseTuple() succeeds
taking False path
157 return NULL;
158
159 file = bibtex_source_new ();
160
161 /* set the strictness */
162 file->strict = strictness;
when treating unknown struct BibtexSource * from bibtexmodule.c:159 as non-NULL
163
164 if (! bibtex_source_string (file, name, string)) {
when considering range: -0x80000000 <= value <= -1
taking False path
165 bibtex_source_destroy (file, TRUE);
166 return NULL;
167 }
168
169 /* Create a new object */
170 ret = (PyBibtexSource_Object *)
when PyObject_Init() fails
171 PyObject_NEW (PyBibtexSource_Object, & PyBibtexSource_Type);
172 ret->obj = file;
dereferencing NULL (ret->obj) at bibtexmodule.c:174
found 1 similar trace(s) to this
173
174 return (PyObject *) ret;
175 }
File: | bibtexmodule.c |
Function: | bib_open_string |
Error: | returning (PyObject*)NULL without setting an exception |
147 static PyObject *
148 bib_open_string (PyObject * self, PyObject * args)
149 {
150 char * name, * string;
151 BibtexSource * file;
152 gint strictness;
153
154 PyBibtexSource_Object * ret;
155
156 if (! PyArg_ParseTuple(args, "ssi", & name, & string, & strictness))
when PyArg_ParseTuple() succeeds
taking False path
157 return NULL;
158
159 file = bibtex_source_new ();
160
161 /* set the strictness */
162 file->strict = strictness;
when treating unknown struct BibtexSource * from bibtexmodule.c:159 as non-NULL
163
164 if (! bibtex_source_string (file, name, string)) {
when considering value == (gboolean)0 from bibtexmodule.c:164
taking True path
165 bibtex_source_destroy (file, TRUE);
166 return NULL;
167 }
168
169 /* Create a new object */
170 ret = (PyBibtexSource_Object *)
171 PyObject_NEW (PyBibtexSource_Object, & PyBibtexSource_Type);
172 ret->obj = file;
173
174 return (PyObject *) ret;
175 }
returning (PyObject*)NULL without setting an exception