>From 1621548d428f8fb42c3429b0936309c49ce02dbc Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 25 May 2015 10:20:39 +0200 Subject: [PATCH 1/2] DP: Set extra_value to NULL for enum requests Some providers, notably IPA, rely on extra_value to be either a useful value or NULL. In enumeration, however, extra_value was random. Set the extra_value pointer explicitly to NULL to make it clear that it's not used for enumeration and also use talloc_zero as future-proof. --- src/providers/data_provider_be.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index a37fbbc8d72d8bc0bf31b9b05a4aaf24c2f4c9e6..34c7b2c766ee4072ee980ad43f1e1d33ee7c8a5a 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -1155,7 +1155,7 @@ static int be_get_account_info(struct sbus_request *dbus_req, void *user_data) goto done; } - req = talloc(be_req, struct be_acct_req); + req = talloc_zero(be_req, struct be_acct_req); if (!req) { err_maj = DP_ERR_FATAL; err_min = ENOMEM; @@ -1202,6 +1202,7 @@ static int be_get_account_info(struct sbus_request *dbus_req, void *user_data) } else if (strcmp(filter, ENUM_INDICATOR) == 0) { req->filter_type = BE_FILTER_ENUM; req->filter_value = NULL; + req->extra_value = NULL; } else { err_maj = DP_ERR_FATAL; err_min = EINVAL; -- 2.1.0