1177 PyMODINIT_FUNC
1178 PyInit_xattr(void)
1179
1180 {
1181 PyObject *ns_security = NULL;
1182 PyObject *ns_system = NULL;
1183 PyObject *ns_trusted = NULL;
1184 PyObject *ns_user = NULL;
1185 PyObject *m = PyModule_Create(&xattrmodule);
when PyModule_Create2() succeeds
'*m' was allocated at: PyObject *m = PyModule_Create(&xattrmodule);
ob_refcnt is now refs: 1 owned
1186 if (m==NULL)
taking False path
1187 return NULL;
1188
1189 PyModule_AddStringConstant(m, "__author__", _XATTR_AUTHOR);
when PyModule_AddStringConstant() succeeds
1190 PyModule_AddStringConstant(m, "__contact__", _XATTR_EMAIL);
when PyModule_AddStringConstant() succeeds
1191 PyModule_AddStringConstant(m, "__version__", _XATTR_VERSION);
when PyModule_AddStringConstant() succeeds
1192 PyModule_AddStringConstant(m, "__license__",
when PyModule_AddStringConstant() succeeds
1193 "GNU Lesser General Public License (LGPL)");
1194 PyModule_AddStringConstant(m, "__docformat__", "restructuredtext en");
when PyModule_AddStringConstant() succeeds
1195
1196 PyModule_AddIntConstant(m, "XATTR_CREATE", XATTR_CREATE);
when PyModule_AddIntConstant() succeeds
1197 PyModule_AddIntConstant(m, "XATTR_REPLACE", XATTR_REPLACE);
when PyModule_AddIntConstant() succeeds
1198
1199 /* namespace constants */
1200 if((ns_security = PyBytes_FromString("security")) == NULL)
when PyBytes_FromString() succeeds
taking False path
1201 goto err_out;
1202 if((ns_system = PyBytes_FromString("system")) == NULL)
when PyBytes_FromString() succeeds
taking False path
1203 goto err_out;
1204 if((ns_trusted = PyBytes_FromString("trusted")) == NULL)
when PyBytes_FromString() succeeds
taking False path
1205 goto err_out;
1206 if((ns_user = PyBytes_FromString("user")) == NULL)
when PyBytes_FromString() succeeds
taking False path
1207 goto err_out;
1208 if(PyModule_AddObject(m, "NS_SECURITY", ns_security) < 0)
when PyModule_AddObject() succeeds
taking False path
1209 goto err_out;
1210 ns_security = NULL;
1211 if(PyModule_AddObject(m, "NS_SYSTEM", ns_system) < 0)
when PyModule_AddObject() succeeds
taking False path
1212 goto err_out;
1213 ns_system = NULL;
1214 if(PyModule_AddObject(m, "NS_TRUSTED", ns_trusted) < 0)
when PyModule_AddObject() succeeds
taking False path
1215 goto err_out;
1216 ns_trusted = NULL;
1217 if(PyModule_AddObject(m, "NS_USER", ns_user) < 0)
when PyModule_AddObject() fails
taking True path
1218 goto err_out;
1219 ns_user = NULL;
1220
1221 return m;
1222
1223 err_out:
1224 Py_XDECREF(ns_user);
taking True path
when taking True path
1225 Py_XDECREF(ns_trusted);
taking False path
1226 Py_XDECREF(ns_system);
taking False path
1227 Py_XDECREF(ns_security);
taking False path
1228 INITERROR;
memory leak: ob_refcnt of '*m' is 1 too high
was expecting final owned ob_refcnt of '*m' to be 0 since nothing references it but final ob_refcnt is refs: 1 owned
found 13 similar trace(s) to this
1229 }