Covscan detected the following issues in ipa 4.11:
freeipa-4.11.0/daemons/ipa-otpd/passkey.c:310: var_decl: Declaring variable "ret" without initializer. freeipa-4.11.0/daemons/ipa-otpd/passkey.c:334: uninit_use_in_call: Using uninitialized value "ret" when calling "otpd_log_err_".
# 332| sep = strchr(start, ','); # 333| if (sep == NULL || sep == start) { # 334|-> otpd_log_err(ret, "Missing seperator in [%s]", ipa_passkey[c]); # 335| continue; # 336| }
freeipa-4.11.0/daemons/ipa-otpd/passkey.c:310: var_decl: Declaring variable "ret" without initializer. freeipa-4.11.0/daemons/ipa-otpd/passkey.c:328: uninit_use_in_call: Using uninitialized value "ret" when calling "otpd_log_err_".
# 326| for (c = 0; ipa_passkey[c] != NULL; c++) { # 327| if (strncmp(ipa_passkey[c], PK_PREF, strlen(PK_PREF)) != 0) { # 328|-> otpd_log_err(ret, "Missing prefix in [%s]", ipa_passkey[c]); # 329| continue; # 330| }
freeipa-4.11.0/daemons/ipa-otpd/passkey.c:687: alloc_fn: Storage is returned from allocation function "calloc". freeipa-4.11.0/daemons/ipa-otpd/passkey.c:687: var_assign: Assigning: "child_ctx" = storage returned from "calloc(40UL, 1UL)". freeipa-4.11.0/daemons/ipa-otpd/passkey.c:805: leaked_storage: Variable "child_ctx" going out of scope leaks the storage it points to.
# 803| } # 804| # 805|-> return ret; # 806| } # 807|
freeipa-4.11.0/daemons/ipa-kdb/ipa_kdb_principals.c:1127: alloc_arg: "ipadb_ldap_attr_to_strlist" allocates memory that is stored into "acl_list". freeipa-4.11.0/daemons/ipa-kdb/ipa_kdb_principals.c:1151: leaked_storage: Variable "acl_list" going out of scope leaks the storage it points to.
# 1149| } # 1150| *kentry = entry; # 1151|-> return kerr; # 1152| } # 1153|
The UNINIT is probably not a functional issue as most compilers default values to 0 but it would be good to be explicit.
I think the RESOURCE_LEAK of child_ctx may be a false positive as a callback is set to free the entry.
The RESOURCE_LEAK in ipa_kdb_principals was resolved in 15de71ae61b0f97689bc8cf38256446f3e7922c1
master:
ipa-4-12:
Metadata Update from @sumenon: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)