SvPV_set will just set SvPVX, allowing the existing value to leak.
This leak was caused by
f082678508, which allowed reg_temp_copy to
be called with an existing SV, but without modifying the contents of
reg_temp_copy to account.
by pointing directly at the buffer, but flagging that the allocated
space in the copy is zero. As we've just done a struct copy, it's now
a case of zero-ing that, rather than copying the current length. */
+ if (SvPOKp(ret_x)) SvPV_free(ret_x);
SvPV_set(ret_x, RX_WRAPPED(rx));
SvFLAGS(ret_x) |= SvFLAGS(rx) & (SVf_POK|SVp_POK|SVf_UTF8);
memcpy(&(ret->xpv_cur), &(r->xpv_cur),