Opened 7 years ago

Closed 7 years ago

#10423 closed defect (fixed)

Avoid bad free on failure to dump microdescriptor.

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When we wipe out an unwriteable microdescriptor's body because dump_microdescriptor() failed, we forgot to clear its body field too. This will cause trouble later when we call microdesc_free() on that descriptor.

This is a problem in our #9047 fix.

Spotted by bobnomnom.

Child Tickets

Change History (2)

comment:1 Changed 7 years ago by nickm

Status: newneeds_review

Code for review in branch "bug10423"

comment:2 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Bug reporter likes the patch. Seems okay to me. Merging it.

(The original problem is another instance of why it's important not to allow duplicate code to form.)

Note: See TracTickets for help on using tickets.