Clearing memory leak in matrix padding test