title: How to get in script whether valgrind found memory leaks?
body: <p>I am running valgrind in a bash script, and directing the valgrind's output to a file. Like this :</p>
  
  <pre><code>valgrind --leak-check=full --show-reachable=yes --xml=yes --xml-file=unit_tests_valgrind.out.xml ./unit_tests_runner
  </code></pre>
  
  <p>The <code>RET_VALUE=$?</code> is going to put the return value of the program (unit_tests_runner above), not from valgrind. And the only way to check whether the valgrind found memory problems is to open the log.</p>
  
  <p>Is there a way to check in a script whether there are memory problems? If yes, how?</p>