recovery: fix failure to unmount "/cache"
At load_locale_from_cache() function, LOCALE_FILE must get closed
after it is opened and used. Otherwise it causes a failure to
unmount "/cache" after load_locale_from_cache() function is called.
Change-Id: I9cec0f29a8ec4452c8a6a52e2f3c8ce9930d5372
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/recovery.cpp b/recovery.cpp
index 5c1e3cd..594774f 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -798,6 +798,7 @@
}
buffer[j] = 0;
locale = strdup(buffer);
+ check_and_fclose(fp, LOCALE_FILE);
}
}