Some memory leak present in Pidgin.

Mark Doliner mark at kingant.net
Fri Mar 27 06:18:41 EDT 2009


I looked through all of these and fixed the ones that made sense.
Some of them I couldn't find... I'm guessing because line numbers
might have changed or because they've already been fixed.  Some of
them are invalid... like a lot of the ones for msn it complains that
we're not freeing the return value from realloc, even though we
checked that the return value is NULL.

Thanks!
-Mark

On Wed, Mar 25, 2009 at 10:28 PM, Mayank Jain Nawal
<mayank at in.niksun.com> wrote:
> Hi,
>
> Some of the memory leak are present in the pidgin source code. Hope
> removal of these leaks solve the problem of crash.
>
> [pidgin-2.5.5/finch/gntroomlist.c:54]: (style) struct or union member
> '_FinchRoomlist::join' is never used
> [pidgin-2.5.5/finch/libgnt/gntentry.c:256]: (error) Deallocating a
> deallocated pointer: match
> [pidgin-2.5.5/finch/libgnt/wms/irssi.c:48]: (style) struct or union
> member '_Irssi::inherit' is never used
> [pidgin-2.5.5/finch/libgnt/wms/irssi.c:58]: (style) struct or union
> member '_IrssiClass::inherit' is never used
> [pidgin-2.5.5/finch/libgnt/wms/s.c:24]: (style) struct or union member
> '_S::inherit' is never used
> [pidgin-2.5.5/finch/libgnt/wms/s.c:29]: (style) struct or union member
> '_SClass::inherit' is never used
> [pidgin-2.5.5/libpurple/desktopitem.c:836]: (error) Memory leak: str
> [pidgin-2.5.5/libpurple/nat-pmp.c:84]: (style) struct or union member
> '_PurplePmpMapResponse::resultcode' is never used
> [pidgin-2.5.5/libpurple/nat-pmp.c:85]: (style) struct or union member
> '_PurplePmpMapResponse::epoch' is never used
> [pidgin-2.5.5/libpurple/ntlm.c:62]: (style) struct or union member
> 'type2_message::msg_len1' is never used
> [pidgin-2.5.5/libpurple/ntlm.c:63]: (style) struct or union member
> 'type2_message::msg_len2' is never used
> [pidgin-2.5.5/libpurple/ntlm.c:64]: (style) struct or union member
> 'type2_message::msg_off' is never used
> [pidgin-2.5.5/libpurple/ntlm.c:69]: (style) struct or union member
> 'type2_message::context' is never used
> [pidgin-2.5.5/libpurple/plugins/mono/loader/mono.c:88]: (error) Memory
> leak: info
> [pidgin-2.5.5/libpurple/plugins/mono/loader/mono.c:88]: (error) Memory
> leak: mplug
> [pidgin-2.5.5/libpurple/protocols/gg/lib/common.c:126]: (error) Memory
> leak: tmp
> [pidgin-2.5.5/libpurple/protocols/gg/lib/common.c:527]: (style)
> Redundant condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/events.c:961]: (style)
> Redundant condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/common.c:504]: (style)
> Redundant condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/common.c:506]: (style)
> Redundant condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/common.c:508]: (style)
> Redundant condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/http.c:91]: (style) Redundant
> condition. It is safe to deallocate a NULL pointer
> [pidgin-2.5.5/libpurple/protocols/gg/lib/libgadu.c:883]: (error) Memory
> leak: tmp2
> [pidgin-2.5.5/libpurple/protocols/gg/lib/libgadu.c:1425]: (error) Memory
> leak: buf
> [pidgin-2.5.5/libpurple/protocols/gg/lib/pubdir50.c:98]: (error) Memory
> leak: tmp
> [pidgin-2.5.5/libpurple/protocols/jabber/buddy.c:304]: (style) struct or
> union member 'vcard_template::text' is never used
> [pidgin-2.5.5/libpurple/protocols/jabber/buddy.c:305]: (style) struct or
> union member 'vcard_template::visible' is never used
> [pidgin-2.5.5/libpurple/protocols/jabber/buddy.c:306]: (style) struct or
> union member 'vcard_template::editable' is never used
> [pidgin-2.5.5/libpurple/protocols/jabber/buddy.c:309]: (style) struct or
> union member 'vcard_template::url' is never used
> [pidgin-2.5.5/libpurple/protocols/jabber/si.c:1279]: (all) Memory leak: jsx
> [pidgin-2.5.5/libpurple/protocols/jabber/xdata.c:161]: (all) Memory
> leak: actionhandle
> [pidgin-2.5.5/libpurple/protocols/msn/cmdproc.c:221]: (error) Memory
> leak: trans
> [pidgin-2.5.5/libpurple/protocols/msn/msnutils.c:457]: (error) Memory
> leak: fontface
> [pidgin-2.5.5/libpurple/protocols/msn/oim.c:268]: (error) Memory leak: data
> [pidgin-2.5.5/libpurple/protocols/msnp9/cmdproc.c:216]: (error) Memory
> leak: trans
> [pidgin-2.5.5/libpurple/protocols/msnp9/msn-utils.c:420]: (error) Memory
> leak: fontface
> [pidgin-2.5.5/libpurple/protocols/novell/nmmessage.c:27]: (style) struct
> or union member '_NMMessage::data' is never used
> [pidgin-2.5.5/libpurple/protocols/myspace/myspace.c:2540]: (error)
> Memory leak: stripped
> [pidgin-2.5.5/libpurple/protocols/myspace/myspace.c:2581]: (error)
> Memory leak: stripped
> [pidgin-2.5.5/libpurple/protocols/oscar/oscar.c:923]: (all) Memory leak:
> itmsurl
> [pidgin-2.5.5/libpurple/protocols/qq/buddy_list.c:50]: (style) struct or
> union member '_qq_buddy_online::bs' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:77]: (style) struct or union
> member 'ft_request::user' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:78]: (style) struct or union
> member 'ft_request::UID' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:79]: (style) struct or union
> member 'ft_request::cookie' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:80]: (style) struct or union
> member 'ft_request::ip' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:81]: (style) struct or union
> member 'ft_request::port' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:82]: (style) struct or union
> member 'ft_request::message' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:83]: (style) struct or union
> member 'ft_request::filename' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:84]: (style) struct or union
> member 'ft_request::files' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:85]: (style) struct or union
> member 'ft_request::size' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:89]: (style) struct or union
> member 'buddy_icon::hash' is never used
> [pidgin-2.5.5/libpurple/protocols/toc/toc.c:91]: (style) struct or union
> member 'buddy_icon::time' is never used
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_crypt.c:59]: (error)
> Memory leak: buffer
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_filexfer.c:894]: (all)
> Memory leak: xfer_data
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_filexfer.c:922]: (all)
> Memory leak: xfer_data
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_filexfer.c:1417]: (all)
> Memory leak: xfer_data
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_picture.c:630]: (all)
> Memory leak: d
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_profile.c:61]: (style)
> struct or union member 'profile_strings_node::yahoo_id_string' is never used
> [pidgin-2.5.5/libpurple/protocols/yahoo/yahoo_profile.c:81]: (style)
> struct or union member 'profile_strings_node::dummy' is never used
> [pidgin-2.5.5/libpurple/protocols/zephyr/zephyr.c:2473]: (error) Memory
> leak: classname
> [pidgin-2.5.5/libpurple/protocols/zephyr/zephyr_err.c:39]: (style)
> struct or union member 'error_table::base' is never used
> [pidgin-2.5.5/libpurple/protocols/zephyr/zephyr_err.c:40]: (style)
> struct or union member 'error_table::n_msgs' is never used
> [pidgin-2.5.5/libpurple/smiley.c:41]: (style) struct or union member
> '_PurpleSmiley::parent' is never used
> [pidgin-2.5.5/libpurple/smiley.c:52]: (style) struct or union member
> '_PurpleSmileyClass::parent_class' is never used
> [pidgin-2.5.5/libpurple/upnp.c:674]: (all) Memory leak: dd
> [pidgin-2.5.5/libpurple/util.c:299]: (style) Warning - using char
> variable in bit operation
> [pidgin-2.5.5/libpurple/win32/giowin32.c:123]: (style) struct or union
> member '_GIOWin32Watch::source' is never used
> [pidgin-2.5.5/pidgin/gtkblist.c:2734]: (style) struct or union member
> 'tooltip_data::avatar_is_prpl_icon' is never used
> [pidgin-2.5.5/pidgin/gtkimhtml.c:3727]: (error) Memory leak: type
> [pidgin-2.5.5/pidgin/gtklog.c:382]: (error) Memory leak: data
> [pidgin-2.5.5/pidgin/gtklog.c:419]: (error) Memory leak: data
> [pidgin-2.5.5/pidgin/gtkroomlist.c:66]: (style) struct or union member
> '_PidginRoomlist::tip_rect' is never used
> [pidgin-2.5.5/pidgin/gtkroomlist.c:67]: (style) struct or union member
> '_PidginRoomlist::timeout' is never used
> [pidgin-2.5.5/pidgin/gtkthemes.c:369]: (all) Memory leak: theme
> [pidgin-2.5.5/pidgin/gtkutils.c:2451]: (error) Memory leak: dialog
> [pidgin-2.5.5/pidgin/win32/untar.c:217]: (error) Resource leak: fpsrc
>
>
> Regards
> Mayank Jain Nawal
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>




More information about the Devel mailing list