Navigation Menu

Skip to content

Commit

Permalink
Fix a memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 11, 2018
1 parent 2aebf32 commit 02d8a47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/proc/proc_tokenize.c
Expand Up @@ -269,6 +269,8 @@ tokenize(grn_ctx *ctx,
GRN_TEXT_INIT(&name, 0);
GRN_VOID_INIT(&value);
for (i = 0; i < n_metadata; i++) {
GRN_BULK_REWIND(&name);
GRN_BULK_REWIND(&value);
grn_token_metadata_at(ctx, metadata, i, &name, &value);
if (GRN_TEXT_LEN(&name) == 0) {
continue;
Expand All @@ -286,6 +288,8 @@ tokenize(grn_ctx *ctx,
0,
value.header.domain);
}
GRN_OBJ_FIN(ctx, &name);
GRN_OBJ_FIN(ctx, &value);
}
}
grn_token_cursor_close(ctx, token_cursor);
Expand Down

0 comments on commit 02d8a47

Please sign in to comment.