insert_dict is used as a convenience to decrement the values to
prevent leaks with orpahaned PyObjects and avoid excessive creation of
temp variables.
if (!dict_insert(parameters,
"rootdn",
PyUnicode_FromString(settings->root_dn_str))) {
status = NT_STATUS_UNSUCCESSFUL;
goto out;
}
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
const char* key,
PyObject* value)
{
+ if (value == NULL) {
+ return false;
+ }
if (PyDict_SetItemString(dict, key, value) == -1) {
Py_XDECREF(value);
return false;