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)

Changed 6 years ago by mt

Patch

comment:1 Changed 6 years ago by mt

Has a Patch: set

Changed 6 years ago by mt

Attachment: report-mq2NP5.html added

Report by Clang Static Analyzer

comment:2 Changed 6 years ago by korli

The patch looks OK.

comment:3 Changed 6 years ago by mmadia

Resolution: fixed
Status: newclosed

Applied in hrev46267. Thanks!

Note: See TracTickets for help on using tickets.