Ticket #45910

oblig_hard_req_reg() for zero action results

Open Date: 2022-10-18 03:07 Last Update: 2022-12-04 13:24

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

Details

Originally detected by valgrind as a memory leak: One of the oblig_hard_req_reg() calls has no target action results (list is immediately terminated by ACTRES_NONE). With zero users to begin with, nobody reduces its reference count and thus code to free it is never triggered.

It's likely that a more serious bug than tiny memory leak lurks there - certainly it was not created to be registered to no action.

It's the one about war with tile owner OR tile having no city.

Ticket History (3/6 Histories)

2022-10-18 03:07 Updated by: cazfi
  • New Ticket "oblig_hard_req_re() for zero action results" created
2022-10-18 07:23 Updated by: cazfi
  • Summary Updated
2022-10-30 15:02 Updated by: cazfi
  • Milestone Update from (None) to 3.2.0
  • Component Update from (None) to General
Comment

Reply To cazfi

It's likely that a more serious bug than tiny memory leak lurks there - certainly it was not created to be registered to no action.

It's used in S3_1, for ACTRES_BOMBARD. It's no longer an obligatory bombard requirement in master. The oblig_hard_req_reg() call just wasn't removed when the only action previously registered to it stopped being registered to it.

2022-11-28 05:53 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-12-04 13:24 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