Added original check_leaks.c file

reviewed