diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-16 09:48:58 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-16 09:50:39 +0100 |
commit | d7de3fa799fa64a3463765b3f6159fccda581b0c (patch) | |
tree | 3e972b467731069df527ca564e77b28bfabc2bc6 /source4/dsdb | |
parent | abe75a5c8c42a15927ae4f4fb3ff69aef1569d1e (diff) | |
download | samba-d7de3fa799fa64a3463765b3f6159fccda581b0c.tar.gz samba-d7de3fa799fa64a3463765b3f6159fccda581b0c.tar.bz2 samba-d7de3fa799fa64a3463765b3f6159fccda581b0c.zip |
s4:dsdb - fix up warnings
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/linked_attributes.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/resolve_oids.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index 1e0a2b05f3..56ed447771 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -163,7 +163,7 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques schema = dsdb_get_schema(ldb, res); if (!schema) { - ldb_oom(schema); + ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; } diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c index aab997d996..9928945375 100644 --- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c +++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c @@ -521,7 +521,10 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re return LDB_ERR_OPERATIONS_ERROR; } - talloc_reference(tree, schema); + if (talloc_reference(tree, schema) == NULL) { + ldb_oom(ldb); + return LDB_ERR_OPERATIONS_ERROR; + } ret = resolve_oids_parse_tree_replace(ldb, schema, tree); @@ -529,7 +532,8 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re return ret; } - attrs2 = str_list_copy_const(ac, req->op.search.attrs); + attrs2 = str_list_copy_const(ac, + discard_const_p(const char *, req->op.search.attrs)); if (req->op.search.attrs && !attrs2) { ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; @@ -537,7 +541,7 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re for (i=0; attrs2 && attrs2[i]; i++) { const char *p; - struct dsdb_attribute *a; + const struct dsdb_attribute *a; p = strchr(attrs2[i], '.'); if (p == NULL) { |