mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-30 03:20:56 +00:00
Fix a refcounting issue in the udev plugin
Objects are returned from the cache with transfer:none. Hopefully fixes https://github.com/hughsie/fwupd/issues/86
This commit is contained in:
parent
6ad951d27c
commit
48d23f7bb0
@ -112,6 +112,7 @@ fu_plugin_verify (FuPlugin *plugin,
|
|||||||
static void
|
static void
|
||||||
fu_plugin_udev_add (FuPlugin *plugin, GUdevDevice *device)
|
fu_plugin_udev_add (FuPlugin *plugin, GUdevDevice *device)
|
||||||
{
|
{
|
||||||
|
FuDevice *dev_tmp;
|
||||||
const gchar *display_name;
|
const gchar *display_name;
|
||||||
const gchar *guid;
|
const gchar *guid;
|
||||||
const gchar *product;
|
const gchar *product;
|
||||||
@ -136,8 +137,8 @@ fu_plugin_udev_add (FuPlugin *plugin, GUdevDevice *device)
|
|||||||
|
|
||||||
/* is already in database */
|
/* is already in database */
|
||||||
id = fu_plugin_udev_get_id (device);
|
id = fu_plugin_udev_get_id (device);
|
||||||
dev = fu_plugin_cache_lookup (plugin, id);
|
dev_tmp = fu_plugin_cache_lookup (plugin, id);
|
||||||
if (dev != NULL) {
|
if (dev_tmp != NULL) {
|
||||||
g_debug ("ignoring duplicate %s", id);
|
g_debug ("ignoring duplicate %s", id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user