mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Don't check for null pointer in calls to free
According to the C99 specification section 7.20.3.2 paragraph 2: > If ptr is a null pointer, no action occurs. So we do not need to check that the pointer is a null pointer.
This commit is contained in:
parent
37a893d129
commit
58386814a7
Notes:
git
2023-06-30 13:13:49 +00:00
16 changed files with 70 additions and 108 deletions
|
@ -1715,8 +1715,7 @@ rb_econv_close(rb_econv_t *ec)
|
|||
}
|
||||
for (i = 0; i < ec->num_trans; i++) {
|
||||
rb_transcoding_close(ec->elems[i].tc);
|
||||
if (ec->elems[i].out_buf_start)
|
||||
xfree(ec->elems[i].out_buf_start);
|
||||
xfree(ec->elems[i].out_buf_start);
|
||||
}
|
||||
xfree(ec->in_buf_start);
|
||||
xfree(ec->elems);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue