Please note that this patch also ADDS a Coverity warning:
libuser-0.62/apps/lnewusers.c:97: deref_ptr_in_call: Dereferencing pointer "fp". [Note: The source code implementation of the function has been overridden by a builtin model.]
libuser-0.62/apps/lnewusers.c:306: check_after_deref: Null-checking "fp" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
# 304| }
# 305|
# 306|-> if (fp) {
# 307| fclose(fp);
# 308| }
But I think checking a file handle validity is a good defensive behaviour.
Merges:
https://pagure.io/libuser/issue/20
Please note that this patch also ADDS a Coverity warning:
But I think checking a file handle validity is a good defensive behaviour.