Fix buffer leak in test introduced by 282d6e73b82ec943a739201f7be1985c45ef032b