Fix missing data for mObjectSlots.

The refactored version for metadata extraction skipped actually populating
the mObjectSlots list. This can result in memory leaks in libRS, as well
as having the potential for corruption (since we are now returning an
empty list to a driver that expects legitimate boolean values).

Bug: 7377851
Change-Id: Id67d46232eeb6b1f59904037b0504a5c590874ee
diff --git a/lib/Renderscript/RSInfoExtractor.cpp b/lib/Renderscript/RSInfoExtractor.cpp
index 3392982..4ba5703 100644
--- a/lib/Renderscript/RSInfoExtractor.cpp
+++ b/lib/Renderscript/RSInfoExtractor.cpp
@@ -338,6 +338,9 @@
   //===--------------------------------------------------------------------===//
   if (object_slots != NULL) {
     llvm::MDNode *node;
+    for (unsigned int i = 0; i <= export_var->getNumOperands(); i++) {
+      result->mObjectSlots.push(0);
+    }
     FOR_EACH_NODE_IN(object_slots, node) {
       llvm::StringRef val = getStringFromOperand(node->getOperand(0));
       if (val.empty()) {
@@ -349,6 +352,8 @@
           ALOGE("Non-integer object slot value '%s' in %s!", val.str().c_str(),
                 module.getModuleIdentifier().c_str());
           goto bail;
+        } else {
+          result->mObjectSlots.editItemAt(slot) = 1;
         }
       }
     }