Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgen: always free the allocated consts, in the generated _vcleanup() function #20128

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
cgen: always free the allocated consts, in the generated _vcleanup() …
…function
spytheman committed Dec 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b1feb4ccfa2b37c46970607c1fdcebebf6387a6e
3 changes: 2 additions & 1 deletion vlib/net/http/request.v
Original file line number Diff line number Diff line change
@@ -49,7 +49,8 @@ pub mut:
on_finish RequestFinishFn = unsafe { nil }
}

fn (mut req Request) free() {
@[unsafe]
pub fn (mut req Request) free() {
unsafe { req.header.free() }
}

3 changes: 2 additions & 1 deletion vlib/net/http/response.v
Original file line number Diff line number Diff line change
@@ -16,7 +16,8 @@ pub mut:
http_version string
}

fn (mut resp Response) free() {
@[unsafe]
pub fn (mut resp Response) free() {
unsafe { resp.header.free() }
}

Loading