* commit '331dd2708232fb538de60e5aa807bbd4490910f7': Fix a leak on error in tzload.
This commit is contained in:
commit
034663774d
@ -371,9 +371,8 @@ tzload(register const char* name, register struct state* const sp,
|
|||||||
goto oops;
|
goto oops;
|
||||||
int toread;
|
int toread;
|
||||||
fid = __bionic_open_tzdata(name, &toread);
|
fid = __bionic_open_tzdata(name, &toread);
|
||||||
if (fid < 0) {
|
if (fid < 0)
|
||||||
return -1;
|
goto oops;
|
||||||
}
|
|
||||||
nread = read(fid, up->buf, toread);
|
nread = read(fid, up->buf, toread);
|
||||||
if (close(fid) < 0 || nread <= 0)
|
if (close(fid) < 0 || nread <= 0)
|
||||||
goto oops;
|
goto oops;
|
||||||
|
Loading…
Reference in New Issue
Block a user