r = hs_alloc_scratch(db, &filter_scratch);
if (r != HS_SUCCESS) {
if (error) *error = "couldn't allocate scratch";
+ hs_free_database(db);
return -1;
}
if (filter_db) {
if (state == FILTER_FILLING) {
int dl;
- unsigned char *d = rb_base64_decode(data, strlen(data), &dl);
+ unsigned char *d = rb_base64_decode((unsigned char *)data, strlen(data), &dl);
if (!d) {
if (error) *error = "invalid data";
return -1;