diff options
author | George Burgess IV <gbiv@google.com> | 2019-10-24 02:22:00 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-10-24 02:22:00 +0200 |
commit | 37395747a8971bbec7e768c024be5ffe768e47bd (patch) | |
tree | 4e865be910edc4068728b4b359d5b90bbb061012 | |
parent | Skip QD1A.190821.011 in stage-aosp-master (diff) | |
parent | Merge "bootable: leak less memory" (diff) | |
download | android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar.gz android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar.bz2 android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar.lz android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar.xz android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.tar.zst android_bootable_recovery-37395747a8971bbec7e768c024be5ffe768e47bd.zip |
-rw-r--r-- | boot_control/libboot_control.cpp | 3 |
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 |