URL:
https://github.com/SSSD/sssd/pull/89
Title: #89: nss: rewrite nss responder so it uses cache_req
lslebodn commented:
"""
and other warnings from static analyzers
```
Error: NULL_RETURNS (CWE-476): [#def42]
sssd-1.14.90/src/util/sss_ptr_hash.c:302: returned_null:
"sss_ptr_hash_lookup_internal" returns null.
sssd-1.14.90/src/util/sss_ptr_hash.c:251:9: return_null: Explicitly returning null.
sssd-1.14.90/src/util/sss_ptr_hash.c:302: var_assigned: Assigning: "value" =
null return value from "sss_ptr_hash_lookup_internal".
sssd-1.14.90/src/util/sss_ptr_hash.c:303: dereference: Dereferencing a null pointer
"value".
# 301|
# 302| value = sss_ptr_hash_lookup_internal(table, key);
# 303|-> ptr = value->ptr;
# 304|
# 305| table_key.type = HASH_KEY_STRING;
Error: UNUSED_VALUE (CWE-563): [#def43]
sssd-1.14.90/src/util/usertools.c:794: assigned_value: Assigning value "12" to
"ret" here, but that stored value is not used.
# 792| shortname = talloc_strdup(tmp_ctx, name);
# 793| if (shortname == NULL) {
# 794|-> ret = ENOMEM;
# 795| goto done;
# 796| }
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/89#issuecomment-262905530