Close open file descriptor if the version is wrong (Coverity CID 1164481).
This commit is contained in:
parent
568c01bbb5
commit
1c9808ec42
@ -466,8 +466,10 @@ int receive_state(int fd)
|
||||
|
||||
f = fdopen(fd, "r");
|
||||
|
||||
if (get_cmd(f) != C_VER)
|
||||
if (get_cmd(f) != C_VER) {
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
get_string(old_version, sizeof(old_version), f);
|
||||
oops_error = 0;
|
||||
for (pp = &family; (*pp = get_record(f)) != NULL; pp = &((*pp)->next))
|
||||
|
Loading…
Reference in New Issue
Block a user