am 331dd270: am e3345405: Merge "Fix a leak on error in tzload."

* commit '331dd2708232fb538de60e5aa807bbd4490910f7':
  Fix a leak on error in tzload.
This commit is contained in:
Elliott Hughes 2014-02-28 02:28:44 +00:00 committed by Android Git Automerger
commit 034663774d

View File

@ -371,9 +371,8 @@ tzload(register const char* name, register struct state* const sp,
goto oops;
int toread;
fid = __bionic_open_tzdata(name, &toread);
if (fid < 0) {
return -1;
}
if (fid < 0)
goto oops;
nread = read(fid, up->buf, toread);
if (close(fid) < 0 || nread <= 0)
goto oops;