Ticket #132 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

[cppcheck] found a few errors in example code

Reported by: ettlmartin Owned by:
Priority: normal Milestone:
Component: examples Version: 1.2.5
Keywords: Cc: ettlmartin
Blocked By: Blocks:


during a check with the static code analysis tool cppcheck
the tool found a few resource leaks and one memory leak

Here the output of the tool

example/sftp_RW_nonblock.c:287: (Error) Resource leak: tempstorage
example/x11.c:129: (Error) Memory leak: temp_buff
example/scp_write.c:201: (Error) Resource leak: local
example/sftp_write.c:203: (Error) Resource leak: local

Please refer the attached patch that fixes the issues

Best regards

Ettl Martin


fix.patch (1.4 KB) - added by ettlmartin 8 years ago.
proper fix

Download all attachments as: .zip

Change History

Changed 8 years ago by ettlmartin

proper fix

comment:1 Changed 7 years ago by stuge

  • Component changed from misc to examples
  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to 1.2.5
Note: See TracTickets for help on using tickets.