Skip to content

Comments

Change: free report printing context using a function#2669

Merged
greenbonebot merged 2 commits intomainfrom
smaller-print-report-7
Dec 18, 2025
Merged

Change: free report printing context using a function#2669
greenbonebot merged 2 commits intomainfrom
smaller-print-report-7

Conversation

@mattmundell
Copy link
Contributor

What

In print_report_xml_start, Instead of freeing the zone data in tz_revert, free it with a new function.

Why

Eventually there will be more data in the struct, so it makes sense to free it all in one place. This also allows freeing the tz data in the success case, which was missing.

This is part of reducing the size of print_report_xml_start.

References

Follows /pull/2668.

Testing

I got a single report with the PR, then got the same report on the main branch. I made sure they were the same. I did that with two timezones just to be sure (using the timezone term in the filter).

o m m '<get_reports report_id="92a09ffd-a5bd-464b-9f2c-54b78ec5ebcf" details="1" filter="timezone=Pacific/Auckland rows=3 apply_overrides=1 min_qod=60"/>' > /tmp/r-auk-main
o m m '<get_reports report_id="92a09ffd-a5bd-464b-9f2c-54b78ec5ebcf" details="1" filter="timezone=Europe/Berlin rows=3 apply_overrides=1 min_qod=60"/>' > /tmp/r-ber-main
diff /tmp/r-auk /tmp/r-auk-main
diff /tmp/r-ber /tmp/r-ber-main

Instead of freeing the zone data in tz_revert, free it with a new function.
Eventually there will be more data in here, so it makes sense to free it in one
place. This also allows freeing the tz data in the success case, which was
missing.
@mattmundell mattmundell requested review from a team as code owners December 9, 2025 08:44
@greenbonebot greenbonebot enabled auto-merge (rebase) December 9, 2025 08:44
@greenbonebot greenbonebot merged commit ecdf95e into main Dec 18, 2025
29 of 30 checks passed
@greenbonebot greenbonebot deleted the smaller-print-report-7 branch December 18, 2025 10:07
@mattmundell
Copy link
Contributor Author

Thanks @robindittmar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants