Fix descriptor/memory leak in compress(1) code
This is mostly a style fix since the code in question is not called multiple times and doesn't have cummulative effect. PR: 204953 Submitted by: David Binderman <dcb314@hotmail.com> MFC after: 1 week
This commit is contained in:
parent
236b57fe36
commit
b63800ac8f
@ -322,6 +322,8 @@ decompress(const char *in, const char *out, int bits)
|
||||
if ((ofp = fopen(out, "w")) == NULL ||
|
||||
(nr != 0 && fwrite(buf, 1, nr, ofp) != nr)) {
|
||||
cwarn("%s", out);
|
||||
if (ofp)
|
||||
(void)fclose(ofp);
|
||||
(void)fclose(ifp);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user