Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 69d25e2 in mainline


Ignore:
Timestamp:
2014-05-20T14:31:31Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
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.