#132: [cppcheck] found a few errors in example code
-------------------------+--------------------------------------------------
Reporter: ettlmartin | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: examples | Version: 1.2.5
Resolution: fixed | Keywords:
Blocking: | Blockedby:
-------------------------+--------------------------------------------------
Changes (by stuge):
* status: new => closed
* resolution: => fixed
* version: => 1.2.5
* component: misc => examples
Old description:
> during a check with the static code analysis tool cppcheck
> (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
> 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
New description:
during a check with the static code analysis tool cppcheck
(http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
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
-- Comment: Fixed in commit 2149244cfe21a612e2d2f7b568a29b8eb1b96a5d -- Ticket URL: <http://trac.libssh2.org/ticket/132#comment:1> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-02-16