summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-10-24 02:43:05 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-10-24 02:43:05 +0200
commite08a9c45f854ef0b57db2300e19920ff267412af (patch)
tree3a7500d1dbf3d20bde58076202b0b2d5f3e09fbf
parentSkip QD1A.190821.011 in stage-aosp-master am: a5d835720a am: 1b130a6a11 (diff)
parentMerge "bootable: leak less memory" am: 19073f2067 am: 37395747a8 (diff)
downloadandroid_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar.gz
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar.bz2
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar.lz
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar.xz
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.tar.zst
android_bootable_recovery-e08a9c45f854ef0b57db2300e19920ff267412af.zip
-rw-r--r--boot_control/libboot_control.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp
index e3bff9ff3..ff4eaabfa 100644
--- a/boot_control/libboot_control.cpp
+++ b/boot_control/libboot_control.cpp
@@ -218,7 +218,8 @@ bool BootControl::Init() {
}
// Note that since there isn't a module unload function this memory is leaked.
- misc_device_ = strdup(device.c_str());
+ // We use `device` below sometimes, so it's not moved out of here.
+ misc_device_ = device;
initialized_ = true;
// Validate the loaded data, otherwise we will destroy it and re-initialize it