- struct substring ss = ss_cstr (SvPV_nolen (sv));
- char *error;
- bool ok;
-
- error = data_in (ss, SvUTF8(sv) ? UTF8: "iso-8859-1", ifmt->type,
- case_data_rw (c, v), var_get_width (v),
- dict_get_encoding (swi->dict->dict));
- ok = error == NULL;
- free (error);
-
- if ( !ok )
- {
- RETVAL = 0;
- goto finish;
- }
+ struct substring ss = ss_cstr (SvPV_nolen (sv));
+ char *error = data_in (ss,
+ SvUTF8(sv) ? UTF8: "iso-8859-1",
+ ifmt->type,
+ case_data_rw (c, v),
+ var_get_width (v),
+ dict_get_encoding (swi->dict->dict));
+ if (error)
+ {
+ free (error);
+ RETVAL = 0;
+ SvREFCNT_dec_NN (sv);
+ case_unref (c);
+ goto finish;
+ }