Opened 6 years ago

Closed 6 years ago

#9886 closed bug (fixed)

[Interface Kit] PrintJob.cpp: Use of memory after it is freed

Reported by: mt Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: BPrintJob Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

In BPrintJob::BeginJob(), variable "printer" is freed in line 244, but used in line 278 fSetupMessage->AddString(PSRV_FIELD_CURRENT_PRINTER, printer); . Please see attached report.

Attachments (2)

0014-Fix-use-of-memory-after-it-is-freed.patch (1.5 KB ) - added by mt 6 years ago.
Patch
report-mq2NP5.html (106.3 KB ) - added by mt 6 years ago.
Report by Clang Static Analyzer

Download all attachments as: .zip

Change History (5)

comment:1 by mt, 6 years ago

Has a Patch: set

by mt, 6 years ago

Attachment: report-mq2NP5.html added

Report by Clang Static Analyzer

comment:2 by korli, 6 years ago

The patch looks OK.

comment:3 by mmadia, 6 years ago

Resolution: fixed
Status: newclosed

Applied in hrev46267. Thanks!

Note: See TracTickets for help on using tickets.