Merge "Actually remove dead processes from lshal" am: 28765c6184 am: d52b085d44 am: e69eaddc3e
am: 681af84df2

Change-Id: I9e066dcb2b9a165c2642ea393ad30d323f898c16
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index fe2a7ca..710b6e4 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -68,9 +68,9 @@
 
 void ListCommand::removeDeadProcesses(Pids *pids) {
     static const pid_t myPid = getpid();
-    std::remove_if(pids->begin(), pids->end(), [this](auto pid) {
+    pids->erase(std::remove_if(pids->begin(), pids->end(), [this](auto pid) {
         return pid == myPid || this->getCmdline(pid).empty();
-    });
+    }), pids->end());
 }
 
 bool ListCommand::getReferencedPids(