Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.