Changeset 07457d6 in mainline


Ignore:
Timestamp:
2018-01-29T06:22:20Z (6 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
14d789c, 2752620b, a5f7b269
Parents:
03cfe2ec (diff), b8ab299 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermář <jakub@…> (2018-01-29 06:22:20)
git-committer:
GitHub <noreply@…> (2018-01-29 06:22:20)
Message:

Merge pull request #17 from Aearsis/master

libdrv: fix leaking ddf_dev_t reference

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r03cfe2ec r07457d6  
    196196                rc = ENOTSUP;
    197197       
    198         if (rc == EOK)
     198        if (rc == EOK) {
     199                fibril_mutex_lock(&devices_mutex);
     200                list_remove(&dev->link);
     201                fibril_mutex_unlock(&devices_mutex);
    199202                dev_del_ref(dev);
    200        
     203        }
     204       
     205        dev_del_ref(dev);
    201206        async_answer_0(iid, rc);
    202207}
     
    224229                rc = ENOTSUP;
    225230       
    226         if (rc == EOK)
     231        if (rc == EOK) {
     232                fibril_mutex_lock(&devices_mutex);
     233                list_remove(&dev->link);
     234                fibril_mutex_unlock(&devices_mutex);
    227235                dev_del_ref(dev);
    228        
     236        }
     237       
     238        dev_del_ref(dev);
    229239        async_answer_0(iid, rc);
    230240}
Note: See TracChangeset for help on using the changeset viewer.