Fix static analyzer warning showing a potential leak