Skip to content

Commit

Permalink
Fix a crash bug by lock_clear against temporary database
Browse files Browse the repository at this point in the history
    % groonga
    > lock_clear
    (crash)
  • Loading branch information
kou committed Feb 13, 2017
1 parent fd96b62 commit 5119df4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -11317,7 +11317,12 @@ grn_obj_clear_lock(grn_ctx *ctx, grn_obj *obj)
}
}
grn_io_clear_lock(grn_obj_io(obj));
grn_obj_clear_lock(ctx, (grn_obj *)(((grn_db *)obj)->specs));
{
grn_db *db = (grn_db *)obj;
if (db->specs) {
grn_obj_clear_lock(ctx, (grn_obj *)(db->specs));
}
}
break;
case GRN_TABLE_NO_KEY :
grn_array_queue_lock_clear(ctx, (grn_array *)obj);
Expand Down

0 comments on commit 5119df4

Please sign in to comment.