Ignore:
Timestamp:
2015-02-22T22:44:40Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
570f183
Parents:
91f06e5
git-author:
dequis <dx@…> (22-02-15 22:04:08)
git-committer:
dequis <dx@…> (22-02-15 22:44:40)
Message:

coverity: Fix some (harmless?) use-after-free with g_slist_remove()

These were passing a pointer to a variable right after it was g_free()'d

They are most likely harmless as g_slist_remove() probably just needs
the pointer location, but fixing it anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r91f06e5 r05816dd  
    112112                while (md->groups) {
    113113                        struct msn_group *mg = md->groups->data;
     114                        md->groups = g_slist_remove(md->groups, mg);
    114115                        g_free(mg->id);
    115116                        g_free(mg->name);
    116117                        g_free(mg);
    117                         md->groups = g_slist_remove(md->groups, mg);
    118118                }
    119119
     
    127127                while (md->grpq) {
    128128                        struct msn_groupadd *ga = md->grpq->data;
     129                        md->grpq = g_slist_remove(md->grpq, ga);
    129130                        g_free(ga->group);
    130131                        g_free(ga->who);
    131132                        g_free(ga);
    132                         md->grpq = g_slist_remove(md->grpq, ga);
    133133                }
    134134
Note: See TracChangeset for help on using the changeset viewer.