Opened 3 years ago

Closed 3 years ago

#20632 closed defect (fixed)

Fix error handling in rend_service_parse_port_config()

Reported by: twim Owned by:
Priority: Low Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: dgoulet Sponsor: SponsorR-can

Description

rend_service_parse_port_config() leaves err_msg unfreed when caller doesn't care about this message.
Also checks for presence of output message before producing each error message makes code less readable.

Child Tickets

Attachments (1)

0001-Fix-and-simplify-error-handling-code-in-rend_service.patch (3.0 KB) - added by twim 3 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 years ago by twim

Status: newneeds_review

comment:2 Changed 3 years ago by dgoulet

Keywords: tor-hs added
Milestone: Tor: 0.3.0.x-final
Points: 0.1
Reviewer: dgoulet
Sponsor: SponsorR-can
Status: needs_reviewmerge_ready

That makes the function do extra work when err_msg_out is NULL but tbh I'm fine with it as this function is not called often.

lgtm;

comment:3 Changed 3 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

applied; thanks!

Note: See TracTickets for help on using tickets.