Skip to content

Commit

Permalink
mrb: accessor must be unliked
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 16, 2017
1 parent e5065b1 commit a01049b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/mrb/mrb_table_sort_key.c
Expand Up @@ -32,12 +32,18 @@
static void
mrb_grn_table_sort_key_free(mrb_state *mrb, void *data)
{
grn_ctx *ctx = (grn_ctx *)mrb->ud;
grn_table_sort_key *sort_key = data;

if (!sort_key) {
return;
}

if (sort_key->key) {
if (sort_key->key->header.type == GRN_ACCESSOR) {
grn_obj_unlink(ctx, sort_key->key);
}
}
mrb_free(mrb, sort_key);
}

Expand Down

0 comments on commit a01049b

Please sign in to comment.