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

Changeset d708088 in mainline


Ignore:
Timestamp:
2018-11-22T19:17:13Z (20 months ago)
Author:
Jakub Jermar <jakub@…>
Parents:
ca21f1e2
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

    rca21f1e2 rd708088  
    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.