Subject: Re: [libssh2] #132: [cppcheck] found a few errors in example code

Re: [libssh2] #132: [cppcheck] found a few errors in example code

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Tue, 16 Feb 2010 12:26:14 -0000

#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:
-------------------------+--------------------------------------------------
Description changed by stuge:

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
 [http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page
 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

--
-- 
Ticket URL: <http://trac.libssh2.org/ticket/132#comment:2>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-16