summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2016-04-26 18:24:08 +0200
committerDees Troy <dees_troy@teamw.in>2016-05-03 19:48:38 +0200
commit2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f (patch)
tree79aa0cd538781dc4d720596c03f01aab4c3fad6e /partitionmanager.cpp
parentRewrite FS fstab flag processing (diff)
downloadandroid_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar.gz
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar.bz2
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar.lz
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar.xz
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.tar.zst
android_bootable_recovery-2b2dd15cbddaa1e0e8b648d824dfb8c233ab212f.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 95d2520b3..cc36b2eec 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -90,11 +90,9 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
if (fstab_line[strlen(fstab_line) - 1] != '\n')
fstab_line[strlen(fstab_line)] = '\n';
- TWPartition* partition = new TWPartition();
- string line = fstab_line;
- memset(fstab_line, 0, sizeof(fstab_line));
- if (partition->Process_Fstab_Line(line, Display_Error)) {
+ TWPartition* partition = new TWPartition();
+ if (partition->Process_Fstab_Line(fstab_line, Display_Error)) {
if (partition->Is_Storage) {
++storageid;
partition->MTP_Storage_ID = storageid;
@@ -113,6 +111,8 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
} else {
delete partition;
}
+
+ memset(fstab_line, 0, sizeof(fstab_line));
}
fclose(fstabFile);
if (!datamedia && !settings_partition && Find_Partition_By_Path("/sdcard") == NULL && Find_Partition_By_Path("/internal_sd") == NULL && Find_Partition_By_Path("/internal_sdcard") == NULL && Find_Partition_By_Path("/emmc") == NULL) {