mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 12:18:51 +00:00
p is a pointer and cannot be negative so check if it is NULL
Signed-off-by: S.Çağlar Onur <caglar@10ur.org> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
d380c7ff55
commit
7be677a8aa
@ -483,7 +483,7 @@ int sha1sum_file(char *fnam, unsigned char *digest)
|
|||||||
process_lock();
|
process_lock();
|
||||||
f = fopen_cloexec(fnam, "r");
|
f = fopen_cloexec(fnam, "r");
|
||||||
process_unlock();
|
process_unlock();
|
||||||
if (f < 0) {
|
if (!f) {
|
||||||
SYSERROR("Error opening template");
|
SYSERROR("Error opening template");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user