hush_leaktool.sh 285 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. cat temp1 | grep -v $freed >temp2
  9. mv temp2 temp1
  10. done