Opened 8 years ago
Closed 8 years ago
#12835 closed bug (fixed)
[Patch] pcl6: Fix mismatching allocation and deallocation
Reported by: | mt | Owned by: | phoudoin |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Drivers/Printers | Version: | R1/Development |
Keywords: | pcl6 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
fSeedRow and fBuffer are allocated by new[] [1][2], but deallocated by delete [3][4]. [1] http://cgit.haiku-os.org/haiku/tree/src/add-ons/print/drivers/pcl6/DeltaRowCompression.cpp#n19 [2] http://cgit.haiku-os.org/haiku/tree/src/add-ons/print/drivers/pcl6/PCL6Writer.cpp#n20 [3] http://cgit.haiku-os.org/haiku/tree/src/add-ons/print/drivers/pcl6/DeltaRowCompression.cpp#n29 [4] http://cgit.haiku-os.org/haiku/tree/src/add-ons/print/drivers/pcl6/PCL6Writer.cpp#n29
/home/haiku/haiku/haiku/src/add-ons/print/drivers/pcl6/DeltaRowCompression.cpp:29:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete fSeedRow; ^ [] /home/haiku/haiku/haiku/src/add-ons/print/drivers/pcl6/DeltaRowCompression.cpp:19:11: note: allocated with 'new[]' here fSeedRow(new uchar[rowSize]), ^ /home/haiku/haiku/haiku/src/add-ons/print/drivers/pcl6/PCL6Writer.cpp:29:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete fBuffer; ^ [] /home/haiku/haiku/haiku/src/add-ons/print/drivers/pcl6/PCL6Writer.cpp:20:10: note: allocated with 'new[]' here fBuffer(new uint8[bufferSize]), ^
Attachments (1)
Change History (3)
by , 8 years ago
Attachment: | 0020-pcl6-Fix-mismatching-allocation-and-deallocation.patch added |
---|
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in hrev50402.