s3:dsdb/repl_meta_data: fix possible memleak on error in replmd_modify_la_add()
authorStefan Metzmacher <metze@samba.org>
Wed, 1 Mar 2023 20:04:56 +0000 (21:04 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 23 Mar 2023 07:16:34 +0000 (07:16 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index cb32d190dcedda5d4f97400bc0a0c41780adc4fc..24d5e9b6062b96340358541bf7546c2d8eac6443 100644 (file)
@@ -2719,6 +2719,7 @@ static int replmd_modify_la_add(struct ldb_module *module,
                                ret = really_parse_trusted_dn(tmp_ctx, ldb, next,
                                                              schema_attr->syntax->ldap_oid);
                                if (ret != LDB_SUCCESS) {
+                                       talloc_free(tmp_ctx);
                                        return ret;
                                }
                        }