Ticket #45537

"section_list_destroy(sec);" with garbage 'sec'

Open Date: 2022-09-01 00:32 Last Update: 2022-10-02 13:25

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

From clang analyzer report from S3_0.

load_ruleset_nations() does not set 'sec' if there's issues detected in earlier part of the function (it gets set only within later "if (ok) {" -block). Regardless, in the cleanup phase there's an assumption that if it's not NULL, it's leftover from abort within the block that uses it.

/* Clean up on aborted load */
if (sec) {
fc_assert(!ok);
section_list_destroy(sec);
}

Ticket History (3/4 Histories)

2022-09-01 00:32 Updated by: cazfi
  • New Ticket ""section_list_destroy(sec);" with garbage 'sec'" created
2022-09-25 20:23 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
Comment

Going to push also to S2_6

2022-10-02 13:25 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login