summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Kos <okos@redhat.com>2013-03-12 13:05:09 +0100
committerSimo Sorce <simo@redhat.com>2013-03-13 14:44:20 -0400
commit9f37bb2012faa136ef7c1f9fe93689ce2be85637 (patch)
tree80878f3fcba322f77e31b1cc72e38a07e2304c87
parent7c0f319813a13723ebe8dc85b004565b63d5e44d (diff)
downloadsssd-9f37bb2012faa136ef7c1f9fe93689ce2be85637.tar.gz
sssd-9f37bb2012faa136ef7c1f9fe93689ce2be85637.tar.bz2
sssd-9f37bb2012faa136ef7c1f9fe93689ce2be85637.zip
Fix initialization of multiple variables
-rw-r--r--src/db/sysdb_search.c2
-rw-r--r--src/providers/ipa/ipa_hbac_common.c2
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c2
-rw-r--r--src/providers/krb5/krb5_child_handler.c4
-rw-r--r--src/providers/krb5/krb5_renew_tgt.c3
-rw-r--r--src/providers/ldap/sdap_async_groups.c2
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c2
7 files changed, 8 insertions, 9 deletions
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 3226acc6..843c746d 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -168,7 +168,7 @@ done:
static int mpg_convert(struct ldb_message *msg)
{
struct ldb_message_element *el;
- struct ldb_val *val;
+ struct ldb_val *val = NULL;
int i;
el = ldb_msg_find_element(msg, "objectClass");
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 8a1c91ea..2384ba68 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -213,7 +213,7 @@ hbac_ctx_to_rules(TALLOC_CTX *mem_ctx,
{
errno_t ret;
struct hbac_rule **new_rules;
- struct hbac_eval_req *new_request;
+ struct hbac_eval_req *new_request = NULL;
size_t i;
TALLOC_CTX *tmp_ctx = NULL;
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index be088664..bcf966cf 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -586,7 +586,7 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
enum sdap_result result;
char *retoid = NULL;
struct berval *retdata = NULL;
- struct resp_attrs *attrs;
+ struct resp_attrs *attrs = NULL;
time_t now;
uint64_t timeout = 10*60*60; /* FIXME: find a better timeout ! */
const char *homedir = NULL;
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c
index 99922b41..cc309af3 100644
--- a/src/providers/krb5/krb5_child_handler.c
+++ b/src/providers/krb5/krb5_child_handler.c
@@ -89,7 +89,7 @@ static errno_t pack_authtok(struct io_buffer *buf, size_t *rp,
struct sss_auth_token *tok)
{
uint32_t auth_token_type;
- uint32_t auth_token_length;
+ uint32_t auth_token_length = 0;
const char *data;
size_t len;
errno_t ret = EOK;
@@ -345,7 +345,7 @@ struct tevent_req *handle_child_send(TALLOC_CTX *mem_ctx,
struct tevent_req *req, *subreq;
struct handle_child_state *state;
int ret;
- struct io_buffer *buf;
+ struct io_buffer *buf = NULL;
req = tevent_req_create(mem_ctx, &state, struct handle_child_state);
if (req == NULL) {
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
index e8957484..f2ee5d91 100644
--- a/src/providers/krb5/krb5_renew_tgt.c
+++ b/src/providers/krb5/krb5_renew_tgt.c
@@ -157,7 +157,7 @@ static errno_t renew_all_tgts(struct renew_tgt_ctx *renew_tgt_ctx)
time_t now;
struct auth_data *auth_data;
struct renew_data *renew_data;
- struct tevent_timer *te;
+ struct tevent_timer *te = NULL;
ret = hash_entries(renew_tgt_ctx->tgt_table, &count, &entries);
if (ret != HASH_SUCCESS) {
@@ -197,7 +197,6 @@ static errno_t renew_all_tgts(struct renew_tgt_ctx *renew_tgt_ctx)
entries[c].key.str);
if (auth_data->key.str == NULL) {
DEBUG(1, ("talloc_strdup failed.\n"));
- te = NULL;
} else {
te = tevent_add_timer(renew_tgt_ctx->ev,
auth_data, tevent_timeval_current(),
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index d7885e6b..5bfa3549 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -2974,7 +2974,7 @@ sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
SYSDB_CREATE_TIME, SYSDB_NAME,
NULL };
char *filter;
- enum sysdb_member_type mtype;
+ enum sysdb_member_type mtype = -1;
size_t count;
tmp_ctx = talloc_new(NULL);
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 4dfb920d..a79ceb59 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -1048,7 +1048,7 @@ sdap_initgr_store_group_memberships(struct sdap_initgr_nested_state *state)
errno_t ret;
int i, tret;
TALLOC_CTX *tmp_ctx;
- struct membership_diff *miter;
+ struct membership_diff *miter = NULL;
struct membership_diff *memberships = NULL;
bool in_transaction = false;