hush_leaktool.sh 280 B

12345678910111213
  1. #!/bin/sh
  2. # hush's stderr with leak debug enabled
  3. output=output
  4. freelist=`grep 'free 0x' "$output" | cut -d' ' -f2 | sort | uniq | xargs`
  5. grep -v free "$output" >temp1
  6. for freed in $freelist; do
  7. echo Dropping $freed
  8. grep -v $freed <temp1 >temp2
  9. mv temp2 temp1
  10. done