am 294e610f: Merge "Fix verity on system partitions larger than 2G"

* commit '294e610f886eeb839d16172bb5b98559a6a7434d':
  Fix verity on system partitions larger than 2G
This commit is contained in:
Elliott Hughes 2014-12-10 03:48:41 +00:00 committed by Android Git Automerger
commit 603c7d0d95

View file

@ -155,7 +155,7 @@ static int read_verity_metadata(char *block_device, char **signature, char **tab
unsigned table_length;
uint64_t device_length;
int protocol_version;
FILE *device;
int device;
int retval = FS_MGR_SETUP_VERITY_FAIL;
*signature = 0;
*table = 0;
@ -238,11 +238,12 @@ static int read_verity_metadata(char *block_device, char **signature, char **tab
goto out;
}
(*table)[table_length] = 0;
retval = FS_MGR_SETUP_VERITY_SUCCESS;
out:
if (device)
fclose(device);
if (device != -1)
TEMP_FAILURE_RETRY(close(device));
if (retval != FS_MGR_SETUP_VERITY_SUCCESS) {
free(*table);