diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-17 02:45:59 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-17 13:53:03 +0300 |
commit | aedefd3e99f36d11e49e6fbf51cb16ceffec13c4 (patch) | |
tree | 3c3fc9a7add4c10ba6a3ae0aa70352f90fdad67a /source4/dsdb | |
parent | e691b1fd276bbf26961a23a5c450e96f16da5d4e (diff) | |
download | samba-aedefd3e99f36d11e49e6fbf51cb16ceffec13c4.tar.gz samba-aedefd3e99f36d11e49e6fbf51cb16ceffec13c4.tar.bz2 samba-aedefd3e99f36d11e49e6fbf51cb16ceffec13c4.zip |
s4-prefixMap: use dsdb_schema_info_blob_is_valid() for schemaInfo blob validation
This fixes a leaking dsdb_schema_info object also.
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/schema/schema_prefixmap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c index 50f74b7161..8105f1274d 100644 --- a/source4/dsdb/schema/schema_prefixmap.c +++ b/source4/dsdb/schema/schema_prefixmap.c @@ -394,7 +394,6 @@ static WERROR _dsdb_drsuapi_pfm_verify(const struct drsuapi_DsReplicaOIDMapping_ if (have_schema_info) { DATA_BLOB blob; - struct dsdb_schema_info *schi = NULL; if (ctr->num_mappings < 2) { return WERR_INVALID_PARAMETER; @@ -406,10 +405,9 @@ static WERROR _dsdb_drsuapi_pfm_verify(const struct drsuapi_DsReplicaOIDMapping_ return WERR_INVALID_PARAMETER; } - /* parse schemaInfo blob to verify it is valid */ + /* verify schemaInfo blob is valid one */ blob = data_blob_const(mapping->oid.binary_oid, mapping->oid.length); - if (!W_ERROR_IS_OK(dsdb_schema_info_from_blob(&blob, talloc_autofree_context(), &schi))) { - talloc_free(schi); + if (!dsdb_schema_info_blob_is_valid(&blob)) { return WERR_INVALID_PARAMETER; } |