r25755: Fix a couple of memory leaks, in particular a new leak onto the NULL