File: src/python/pyhbac.c
Function: HbacRuleElement_repr
Error: returning (PyObject*)NULL without setting an exception
481 static PyObject *
482 HbacRuleElement_repr(HbacRuleElement *self)
483 {
484     char *strnames = NULL;
485     char *strgroups = NULL;
486     uint32_t category;
487     PyObject *o, *format, *args;
488 
489     format = sss_python_unicode_from_string("<category %lu names [%s] groups [%s]>");
when sss_python_unicode_from_string() succeeds
490     if (format == NULL) {
taking False path
491         return NULL;
492     }
493 
494     strnames = str_concat_sequence(self->names,
495                                    discard_const_p(char, ","));
496     strgroups = str_concat_sequence(self->groups,
497                                     discard_const_p(char, ","));
498     category = native_category(self->category);
499     if (strnames == NULL || strgroups == NULL || category == -1) {
when treating unknown char * from src/python/pyhbac.c:494 as non-NULL
when treating unknown char * from src/python/pyhbac.c:496 as non-NULL
taking False path
when considering value == (uint32_t)0xffffffff from src/python/pyhbac.c:498
taking True path
500         PyMem_Free(strnames);
calling PyMem_Free on Region('heap-region-190')
501         PyMem_Free(strgroups);
calling PyMem_Free on Region('heap-region-191')
502         Py_DECREF(format);
when taking True path
503         return NULL;
504     }
505 
506     args = Py_BuildValue(sss_py_const_p(char, "Kss"),
507                          (unsigned long long ) category,
508                          strnames, strgroups);
509     if (args == NULL) {
510         PyMem_Free(strnames);
511         PyMem_Free(strgroups);
512         Py_DECREF(format);
513         return NULL;
514     }
515 
516     o = PyUnicode_Format(format, args);
517     PyMem_Free(strnames);
518     PyMem_Free(strgroups);
519     Py_DECREF(format);
520     Py_DECREF(args);
521     return o;
522 }
returning (PyObject*)NULL without setting an exception
found 7 similar trace(s) to this