Changeset 69d25e2 in mainline for uspace/srv/locsrv/locsrv.c


Ignore:
Timestamp:
2014-05-20T14:31:31Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
99172baf
Parents:
10ef47ba
Message:

avoid use after free of memb
(detected by Coverity, CID 10451)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/locsrv/locsrv.c

    r10ef47ba r69d25e2  
    320320                svc_categ_t *memb = list_get_instance(link, svc_categ_t,
    321321                    svc_link);
    322                 fibril_mutex_lock(&memb->cat->mutex);
     322                category_t *cat = memb->cat;
     323               
     324                fibril_mutex_lock(&cat->mutex);
    323325                category_remove_service(memb);
    324                 fibril_mutex_unlock(&memb->cat->mutex);
     326                fibril_mutex_unlock(&cat->mutex);
    325327        }
    326328       
Note: See TracChangeset for help on using the changeset viewer.