Skip to content

Commit

Permalink
Merge pull request #977 from mruprich/master
Browse files Browse the repository at this point in the history
log BUGFIX LOGBUF should be called before free
  • Loading branch information
michalvasko authored Dec 13, 2019
2 parents a34e230 + 63c95c1 commit deb38d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,8 +1076,8 @@ make_canonical(struct ly_ctx *ctx, int type, const char **value, void *data1, vo
count += exp->tok_len[i] - j;
} else {
if (count + exp->tok_len[i] > buf_len) {
lyxp_expr_free(exp);
LOGBUF(&exp->expr[exp->expr_pos[i]]);
lyxp_expr_free(exp);
return -1;
}
strncpy(&buf[count], &exp->expr[exp->expr_pos[i]], exp->tok_len[i]);
Expand Down

0 comments on commit deb38d5

Please sign in to comment.