待辦事項 #45910

oblig_hard_req_reg() for zero action results

啟用日期: 2022-10-18 03:07 最後更新: 2022-12-04 13:24

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

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
  • 里程碑 Update from (無) to 3.2.0
  • 元件 Update from (無) to General
評語

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
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
2022-12-04 13:24 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入