status = dns_common_zones(samdb, frame, &zones_list);
if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(frame);
PyErr_SetNTSTATUS(status);
return NULL;
}
werr = dns_common_name2dn(samdb, zones_list, frame, dns_name, &dn);
if (!W_ERROR_IS_OK(werr)) {
+ talloc_free(frame);
PyErr_SetWERROR(werr);
return NULL;
}
&num_records,
NULL);
if (!W_ERROR_IS_OK(werr)) {
+ talloc_free(frame);
PyErr_SetWERROR(werr);
return NULL;
}
- return py_dnsp_DnssrvRpcRecord_get_list(records, num_records);
+ ret = py_dnsp_DnssrvRpcRecord_get_list(records, num_records);
+ talloc_free(frame);
+ return ret;
}
static PyObject *py_dsdb_dns_extract(PyObject *self, PyObject *args)
{
- PyObject *py_dns_el;
+ PyObject *py_dns_el, *ret;
TALLOC_CTX *frame;
WERROR werr;
struct ldb_message_element *dns_el;
&records,
&num_records);
if (!W_ERROR_IS_OK(werr)) {
+ talloc_free(frame);
PyErr_SetWERROR(werr);
return NULL;
}
- return py_dnsp_DnssrvRpcRecord_get_list(records, num_records);
+ ret = py_dnsp_DnssrvRpcRecord_get_list(records, num_records);
+ talloc_free(frame);
+ return ret;
}
static PyObject *py_dsdb_dns_replace(PyObject *self, PyObject *args)
status = dns_common_zones(samdb, frame, &zones_list);
if (!NT_STATUS_IS_OK(status)) {
PyErr_SetNTSTATUS(status);
+ talloc_free(frame);
return NULL;
}
werr = dns_common_name2dn(samdb, zones_list, frame, dns_name, &dn);
if (!W_ERROR_IS_OK(werr)) {
PyErr_SetWERROR(werr);
+ talloc_free(frame);
return NULL;
}
frame,
&records, &num_records);
if (ret != 0) {
+ talloc_free(frame);
return NULL;
}
num_records);
if (!W_ERROR_IS_OK(werr)) {
PyErr_SetWERROR(werr);
+ talloc_free(frame);
return NULL;
}
+ talloc_free(frame);
Py_RETURN_NONE;
}
frame,
&records, &num_records);
if (ret != 0) {
+ talloc_free(frame);
return NULL;
}
num_records);
if (!W_ERROR_IS_OK(werr)) {
PyErr_SetWERROR(werr);
+ talloc_free(frame);
return NULL;
}
+ talloc_free(frame);
+
Py_RETURN_NONE;
}