Merge "Fix the memory leak in nsd tests" into main