]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
source4/provision: fix talloc_steal on unallocated memory
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 23 May 2017 02:13:14 +0000 (14:13 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 25 May 2017 00:25:13 +0000 (02:25 +0200)
The caller will steal *error_string on failure, if it
is not NULL.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/param/provision.c

index cdd28d8542c78fdded66de03af845156f8098f32..e1e5380ad24fb5c11089b2f73cbe747fe2f64125 100644 (file)
@@ -217,6 +217,9 @@ NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context
        PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters, *py_sid;
        struct ldb_context *ldb;
        TALLOC_CTX *tmp_mem = talloc_new(mem_ctx);
+
+       *error_string = NULL;
+
        if (!tmp_mem) {
                return NT_STATUS_NO_MEMORY;
        }