Fix memory leak in qnnpack ops (#51612)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51612
Test Plan: `pytest test/quantization/test_quantized_op.py` passes
Reviewed By: kimishpatel, dhruvbird
Differential Revision: D26217925
Pulled By: axitkhurana
fbshipit-source-id: f422a868d34ea5fe122fcdcce8b80c7859bfc415