From fa9f50878bc93b4ebe5ebf012b207494ff29e6fc Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 8 Dec 2009 11:16:11 -0500 Subject: Fix potential uninitialized value error in responder_dp.c If we fell into the default case of the switch statement, we would attempt to talloc_free() a random memory location. This patch guarantees that sdp_req is NULL if it has not been initialized. --- server/responder/common/responder_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/responder/common/responder_dp.c b/server/responder/common/responder_dp.c index 03e83ec61..1fe1d95ec 100644 --- a/server/responder/common/responder_dp.c +++ b/server/responder/common/responder_dp.c @@ -254,7 +254,7 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *callback_memctx, hash_value_t value; TALLOC_CTX *tmp_ctx; struct timeval tv; - struct sss_dp_req *sdp_req; + struct sss_dp_req *sdp_req = NULL; struct sss_dp_callback *cb; /* either, or, not both */ -- cgit