Merge "fs_mgr: Remove incorrect free() on error paths in load_key()" am: 35d84096e9 am: 6f29ec0197

am: 725ca56851

* commit '725ca56851b9a54c4baa07e22ac42587124af085':
  fs_mgr: Remove incorrect free() on error paths in load_key()

Change-Id: I1101606fbb8abfc012442cb52952d1377240956d
This commit is contained in:
Mattias Nissler 2016-06-07 21:17:40 +00:00 committed by android-build-merger
commit 1d89cfa31c
1 changed files with 0 additions and 3 deletions

View File

@ -91,14 +91,12 @@ static RSA *load_key(const char *path)
FILE* f = fopen(path, "r");
if (!f) {
ERROR("Can't open '%s'\n", path);
free(key_data);
return NULL;
}
if (!fread(key_data, sizeof(key_data), 1, f)) {
ERROR("Could not read key!\n");
fclose(f);
free(key_data);
return NULL;
}
@ -107,7 +105,6 @@ static RSA *load_key(const char *path)
RSA* key = NULL;
if (!android_pubkey_decode(key_data, sizeof(key_data), &key)) {
ERROR("Could not parse key!\n");
free(key_data);
return NULL;
}