Merge "bootable: leak less memory" am: 19073f2067 am: 37395747a8 am: 5026bd6047
am: 67cce21e5d

Change-Id: I5997d7896b54bb7874c3598c9db4b4fad745dbc5
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp
index e3bff9f..ff4eaab 100644
--- a/boot_control/libboot_control.cpp
+++ b/boot_control/libboot_control.cpp
@@ -218,7 +218,8 @@
   }
 
   // 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