BUG: Fix memory leak in ndarray construction from strings (gh-2927)
Merge pull request #2966 from certik/backport2928

BUG: Fix memory leak in ndarray construction from strings (gh-2927)