From 270a0a1b6182ef1fbff2a93af6731788cf954874 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 29 Apr 2010 12:30:05 -0400 Subject: Better handle sdap_handle memory from callers. Always just mark the sdap_handle as not connected and let later _send() functions to take care of freeing the handle before reconnecting. Introduce restart functions to avoid calling _send() functions in _done() functions error paths as this would have the same effect as directly freeing the sdap_handle and cause access to freed memory in sdap_handle_release() By freeing sdap_handle only in the connection _recv() function we guarantee it can never be done within sdap_handle_release() but only in a following event. --- src/providers/data_provider_be.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/providers/data_provider_be.c') diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 69aba6ce..e5a5ff7b 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -405,7 +405,7 @@ static int be_get_account_info(DBusMessage *message, struct sbus_connection *con } /* process request */ - be_req = talloc(becli, struct be_req); + be_req = talloc_zero(becli, struct be_req); if (!be_req) { err_maj = DP_ERR_FATAL; err_min = ENOMEM; -- cgit