summaryrefslogtreecommitdiff
path: root/server/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@metason.pico.li.ssimo.org>2009-10-26 15:11:14 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-10-26 15:41:23 -0400
commite83a84cdce6f5722c027923f6776ae606c3ca6e9 (patch)
tree06cfd5e13c5dd2fd8270910a8c18641fbf5454d0 /server/db
parent1914dfa1522c1171e86f9946a1d5985a66054017 (diff)
downloadsssd-e83a84cdce6f5722c027923f6776ae606c3ca6e9.tar.gz
sssd-e83a84cdce6f5722c027923f6776ae606c3ca6e9.tar.bz2
sssd-e83a84cdce6f5722c027923f6776ae606c3ca6e9.zip
Zero pointers on free
If the pointer stays around, zero it when it is freed, so we do not risk access to released memory in case of bugs.
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/db/sysdb.c b/server/db/sysdb.c
index a0c13385..5811ddc9 100644
--- a/server/db/sysdb.c
+++ b/server/db/sysdb.c
@@ -471,7 +471,7 @@ int sysdb_transaction_commit_recv(struct tevent_req *req)
/* finally free handle
* this will also trigger the next transaction in the queue if any */
- talloc_free(state->handle);
+ talloc_zfree(state->handle);
if (tevent_req_is_error(req, &tstate, &err)) {
return err;
@@ -1227,7 +1227,7 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
ret = EIO;
goto done;
}
- talloc_free(msg);
+ talloc_zfree(msg);
/* == create Users tree == */
@@ -1255,7 +1255,7 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
ret = EIO;
goto done;
}
- talloc_free(msg);
+ talloc_zfree(msg);
/* == create Groups tree == */
@@ -1283,7 +1283,7 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
ret = EIO;
goto done;
}
- talloc_free(msg);
+ talloc_zfree(msg);
ret = EOK;