free-ing memory to avoid memory leakage in test program