blob: f8e47aecdb5fe53e2c0428ebf41d73f6923e316d [file] [log] [blame]
Denis Vlasenkof962a032007-11-23 12:50:54 +00001#!/bin/sh
2
3# hush's stderr with leak debug enabled
4output=output
5
6freelist=`grep 'free 0x' "$output" | cut -d' ' -f2 | sort | uniq | xargs`
7
Denis Vlasenko14725f82009-04-08 16:46:45 +00008grep -v free "$output" >"$output.leaked"
Denis Vlasenkof962a032007-11-23 12:50:54 +00009for freed in $freelist; do
10 echo Dropping $freed
Denis Vlasenko14725f82009-04-08 16:46:45 +000011 grep -v $freed <"$output.leaked" >"$output.temp"
12 mv "$output.temp" "$output.leaked"
Denis Vlasenkof962a032007-11-23 12:50:54 +000013done