Make the purple_account_manager_find functions return transfer full.

Review Request #2579 — Created Aug. 21, 2023 and submitted

Information

pidgin/pidgin
default

Reviewers

It's possible that an account could be removed from the mananger after someone
has grabbed a handle to one, so just give them a reference to avoid the
possible headache later.

Ran the account-manager tests under valgrind.

Summary ID
Make the purple_account_manager_find functions return transfer full.
It's possible that an account could be removed from the mananger after someone has grabbed a handle to one, so just give them a reference to avoid the possible headache later.
131d55709d51aa5baf28a5f4e72ed52a34f7c569
Description From Last Updated

find_acct in libpurple/protocols/jabber/jabber.c conditionally leaks acct.

QuLogicQuLogic

There's an early return in this function that leaks account.

QuLogicQuLogic

There's an early return in this function that leaks account.

QuLogicQuLogic

Should use free_saved_status_sub as well.

QuLogicQuLogic

This should probably be using free_saved_status_sub instead (and that should get the g_clear_object).

QuLogicQuLogic

There's another purple_account_manager_find* above this that is non-NULL.

QuLogicQuLogic
QuLogic
  1. 
      
  2. Show all issues

    find_acct in libpurple/protocols/jabber/jabber.c conditionally leaks acct.

  3. libpurple/buddylist.c (Diff revision 1)
     
     
    Show all issues

    There's an early return in this function that leaks account.

  4. Show all issues

    There's an early return in this function that leaks account.

  5. libpurple/savedstatuses.c (Diff revision 1)
     
     
     
     
    Show all issues

    Should use free_saved_status_sub as well.

  6. libpurple/savedstatuses.c (Diff revision 1)
     
     
     
     
     
    Show all issues

    This should probably be using free_saved_status_sub instead (and that should get the g_clear_object).

  7. libpurple/tests/test_account_manager.c (Diff revision 1)
     
     
    Show all issues

    There's another purple_account_manager_find* above this that is non-NULL.

  8. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed