Navigation Menu

Skip to content

Commit

Permalink
Use GRN_OBJ_FIN() for temporary object
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 23, 2016
1 parent 44999e3 commit 77b432d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ha_mroonga.cpp
Expand Up @@ -5805,12 +5805,12 @@ int ha_mroonga::storage_write_row(uchar *buf)

error = mrn_change_encoding(ctx, field->charset());
if (error) {
grn_obj_unlink(ctx, &colbuf);
GRN_OBJ_FIN(ctx, &colbuf);
goto err;
}
error = generic_store_bulk(field, &colbuf);
if (error) {
grn_obj_unlink(ctx, &colbuf);
GRN_OBJ_FIN(ctx, &colbuf);
goto err;
}

Expand Down Expand Up @@ -5849,13 +5849,13 @@ int ha_mroonga::storage_write_row(uchar *buf)
grn_obj_set_value(ctx, column, record_id, &colbuf, GRN_OBJ_SET);
}
if (ctx->rc) {
grn_obj_unlink(ctx, &colbuf);
GRN_OBJ_FIN(ctx, &colbuf);
my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0));
error = ER_ERROR_ON_WRITE;
goto err;
}
}
grn_obj_unlink(ctx, &colbuf);
GRN_OBJ_FIN(ctx, &colbuf);

error = storage_write_row_multiple_column_indexes(buf, record_id);
if (error) {
Expand Down

0 comments on commit 77b432d

Please sign in to comment.