Remove malloc in edify functions

And switch them to std::vector & std::unique_ptr

Bug: 32117870
Test: recovery tests passed on sailfish
Change-Id: I5a45951c4bdf895be311d6d760e52e7a1b0798c3
diff --git a/updater/updater.cpp b/updater/updater.cpp
index 22c060f..0693cbd 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -130,7 +130,7 @@
 
   // Parse the script.
 
-  Expr* root;
+  std::unique_ptr<Expr> root;
   int error_count = 0;
   int error = parse_string(script.c_str(), &root, &error_count);
   if (error != 0 || error_count > 0) {