diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-30 20:46:57 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-30 20:52:11 +0200 |
commit | c2a3792e72cb534bafce3808c4a7b9f6948e8895 (patch) | |
tree | d723345c792d21af55564e721cd11d6374cf088b /source4/dsdb | |
parent | b7270fbc9971b6e625c15a60e6717410aec2b77a (diff) | |
download | samba-c2a3792e72cb534bafce3808c4a7b9f6948e8895.tar.gz samba-c2a3792e72cb534bafce3808c4a7b9f6948e8895.tar.bz2 samba-c2a3792e72cb534bafce3808c4a7b9f6948e8895.zip |
s4:dsdb/samdb/ldb_modules/util.c - make sure to always free temporary data
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index 37dc885a2d..6512b26fb1 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -47,6 +47,7 @@ int dsdb_module_search_dn(struct ldb_module *module, res = talloc_zero(tmp_ctx, struct ldb_result); if (!res) { + talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } @@ -257,6 +258,7 @@ int dsdb_module_modify(struct ldb_module *module, res = talloc_zero(tmp_ctx, struct ldb_result); if (!res) { + talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } @@ -312,6 +314,7 @@ int dsdb_module_rename(struct ldb_module *module, res = talloc_zero(tmp_ctx, struct ldb_result); if (!res) { + talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } @@ -366,6 +369,7 @@ int dsdb_module_add(struct ldb_module *module, res = talloc_zero(tmp_ctx, struct ldb_result); if (!res) { + talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } @@ -681,7 +685,7 @@ int dsdb_module_load_partition_usn(struct ldb_module *module, struct ldb_dn *dn, p_ctrl = talloc(req, struct dsdb_control_current_partition); if (p_ctrl == NULL) { - talloc_free(res); + talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } p_ctrl->version = DSDB_CONTROL_CURRENT_PARTITION_VERSION; @@ -760,6 +764,7 @@ int dsdb_module_save_partition_usn(struct ldb_module *module, struct ldb_dn *dn, res = talloc_zero(msg, struct ldb_result); if (!res) { + talloc_free(msg); return LDB_ERR_OPERATIONS_ERROR; } |