Denis Vlasenko | f962a03 | 2007-11-23 12:50:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # hush's stderr with leak debug enabled |
| 4 | output=output |
| 5 | |
| 6 | freelist=`grep 'free 0x' "$output" | cut -d' ' -f2 | sort | uniq | xargs` |
| 7 | |
Denis Vlasenko | 14725f8 | 2009-04-08 16:46:45 +0000 | [diff] [blame^] | 8 | grep -v free "$output" >"$output.leaked" |
Denis Vlasenko | f962a03 | 2007-11-23 12:50:54 +0000 | [diff] [blame] | 9 | for freed in $freelist; do |
| 10 | echo Dropping $freed |
Denis Vlasenko | 14725f8 | 2009-04-08 16:46:45 +0000 | [diff] [blame^] | 11 | grep -v $freed <"$output.leaked" >"$output.temp" |
| 12 | mv "$output.temp" "$output.leaked" |
Denis Vlasenko | f962a03 | 2007-11-23 12:50:54 +0000 | [diff] [blame] | 13 | done |