[Pidgin] #9822: Potential issues found by a static analysis tool

Pidgin trac at pidgin.im
Sat Aug 1 22:13:27 EDT 2009


#9822: Potential issues found by a static analysis tool
--------------------------+-------------------------------------------------
 Reporter:  muellejo      |     Owner:  rekkanoryo
     Type:  defect        |    Status:  new       
Component:  unclassified  |   Version:  2.5.8     
 Keywords:                |  
--------------------------+-------------------------------------------------
 The following issues were discovered by version 1.34 of cppcheck. The
 cppcheck project can be found at:
 http://sourceforge.net/projects/cppcheck/ I have annotated a few of the
 findings as I was investigating them.

 {{{
 [libpurple\cipher.c:2731]: (error) Using 'cipher' after it is deallocated
 / released
     unnecessary as purple_ciphers_unregister_cipher() already removes the
 cipher from ciphers
 [libpurple\ft.c:1028]: (all) Memory leak: buffer
 [libpurple\protocols\gg\lib\libgadu.c:794]: (all) Memory leak: buf
 [libpurple\protocols\jabber\google.c:780]: (all) Memory leak: session
 [libpurple\protocols\msn\directconn.c:354]: (all) Memory leak: body
 [libpurple\protocols\msnp9\directconn.c:358]: (all) Memory leak: body
 [libpurple\protocols\oscar\family_icq.c:743]: (all) Memory leak: info
 [libpurple\protocols\oscar\family_icq.c:743]: (error) Memory leak: info
 [libpurple\protocols\yahoo\libymsg.c:1848]: (all) Memory leak: token
 [libpurple\protocols\yahoo\yahoo_filexfer.c:927]: (all) Memory leak:
 xfer_data
 [libpurple\protocols\yahoo\yahoo_filexfer.c:955]: (all) Memory leak:
 xfer_data
 [libpurple\protocols\yahoo\yahoo_filexfer.c:1753]: (all) Memory leak:
 xfer_data
 [pidgin\pidgin\gtkprefs.c:1036]: (error) Deallocating a deallocated
 pointer: info
     unnecessary as theme_install_theme() frees info
 [pidgin\pidgin\gtkthemes.c:369]: (all) Memory leak: theme
 [pidgin\pidgin\plugins\crazychat\glm.c:546]: (error) Resource leak: file
 }}}

 It also found the following, but they seem to be false positives.
 {{{
 [libpurple\desktopitem.c:839]: (error) Memory leak: str
 [libpurple\protocols\bonjour\mdns_avahi.c:204]: (error) Using 'rd' after
 it is deallocated / released
 [libpurple\protocols\jabber\disco.c:92]: (error) Using 'sh' after it is
 deallocated / released
 [libpurple\protocols\jabber\si.c:1358]: (error) Using 'jsx' after it is
 deallocated / released
 [libpurple\protocols\yahoo\yahoo_packet.c:400]: (error) Using 'pair' after
 it is deallocated / released
 [libpurple\util.c:4020]: (all) Memory leak: new_data
 [libpurple\signals.c:366]: (error) Using 'handler_data' after it is
 deallocated / released
 [libpurple\signals.c:401]: (error) Using 'handler_data' after it is
 deallocated / released
 [pidgin\pidgin\gtkblist.c:3563]: (error) Using 'pce' after it is
 deallocated / released
 [pidgin\pidgin\gtkimhtml.c:5843]: (error) Using 'proto' after it is
 deallocated / released
 [pidgin\pidgin\gtkthemes.c:186]: (error) Using 'uio' after it is
 deallocated / released
 [finch\libgnt\gntentry.c:256]: (error) Deallocating a deallocated pointer:
 match
 [finch\libgnt\gntwm.c:841]: (error) Mismatching allocation and
 deallocation: file
 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/9822>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list