[analyzer] Fix a leak found by LSan.

PR19524