Skip to content

Commit

Permalink
Add missing RB_GC_GUARD in Parser#initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
noteflakes committed Aug 25, 2023
1 parent 445f110 commit 7864127
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/h1p/h1p.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ VALUE Parser_initialize(VALUE self, VALUE io, VALUE mode) {
parser->body_read_mode = BODY_READ_MODE_UNKNOWN;
parser->body_left = 0;

RB_GC_GUARD(parser->io);
RB_GC_GUARD(parser->buffer);

parser->buf_ptr = 0;
parser->buf_len = 0;
parser->buf_pos = 0;
Expand Down

0 comments on commit 7864127

Please sign in to comment.