Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#15789 closed defect (fixed)

[PATCH] Memory leaks in src/common/imagbmp.cpp

Reported by: ettl.martin Owned by:
Priority: normal Milestone:
Component: GUI-all Version: dev-latest
Keywords: memory leak Cc:
Blocked By: Blocking:
Patch: yes

Description

Please review the attached patch. It fixes three memory leaks in src/common/imagbmp.cpp.

Best regards and many thanks

Martin Ettl

Attachments (1)

fix_memleak.patch download (567 bytes) - added by ettl.martin 10 months ago.
proposed fix

Download all attachments as: .zip

Change History (3)

Changed 10 months ago by ettl.martin

proposed fix

comment:1 Changed 10 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [75503]) Fix possible memory leak in BMP reading code.

Don't forget to free the arrays even in case of an error while reading from
the stream.

Closes #15789.

comment:2 Changed 10 months ago by VZ

(In [75505]) Use wxScopedArray instead of raw new[]/delete[] and fix memory leak.

Don't leak memory in case of error when reading from the stream in BMP loading
code.

Closes #15789.

Note: See TracTickets for help on using tickets.