Memore leaks solved

This commit is contained in:
pithikos 2015-01-09 17:35:04 +00:00
parent d6d5f3dcd8
commit c91ab00300

View File

@ -124,10 +124,8 @@ EOF
heap_usage=$(echo "$output" | grep "total heap usage")
allocs=$(extract_num "[0-9]* allocs" "$heap_usage")
frees=$(extract_num "[0-9]* frees" "$heap_usage")
if (( "$allocs"-"$frees" > 4 )); then
#if [ "$allocs" != "$frees" ]; then
msg2="Max 4 leaks are allowed since each pthread might erronoumesly show a leak in valgrind."
err "Allocated $allocs times but freed only $frees. $msg2" "$output"
if [ "$allocs" != "$frees" ]; then
err "Allocated $allocs times but freed only $frees" "$output"
fi
done
}