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

Changeset b10e9367 in mainline


Ignore:
Timestamp:
2018-11-27T16:50:01Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
9df0f64
Parents:
3083c74
git-author:
Jakub Jermar <jakub@…> (2018-11-22 19:17:13)
git-committer:
Jakub Jermar <jakub@…> (2018-11-27 16:50:01)
Message:

Fix device reference counting

After commit 498ced1, a device is created with an implicit reference.
Adding an extra reference for creation thus adds a reference that will
never be dropped and the device will be leaked.

This commit removes the extra reference.

File:
1 edited

Legend:

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

    r3083c74 rb10e9367  
    145145        }
    146146
    147         /* Add one reference that will be dropped by driver_dev_remove() */
    148         dev_add_ref(dev);
    149147        dev->handle = dev_handle;
    150148        dev->name = dev_name;
Note: See TracChangeset for help on using the changeset viewer.