common/rc: move rm out from if block to always delete kmemleak temp file

Otherwise, *.kmemleak.tmp may remain in result folder if kmemleak is on.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Misono Tomohiro
2018-04-23 14:23:14 +09:00
committed by Eryu Guan
parent d4da414a9a
commit d3977ca35a
+1 -1
View File
@@ -3515,8 +3515,8 @@ EXPERIMENTAL kmemleak reported some memory leaks! Due to the way kmemleak
works, the leak might be from an earlier test, or something totally unrelated.
ENDL
cat "$leak_file.tmp" >> "$leak_file"
rm -rf "$leak_file.tmp"
fi
rm -rf "$leak_file.tmp"
echo "clear" > "$kern_knob"
}