mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-05 01:18:20 +00:00
object: fix potential leak in getters
If the property is not of the requested type, the getters will leak a QObject. Backports commit 560f19f162529d691619ac69ed032321c7f5f1fb from qemu
This commit is contained in:
parent
42bb73fa96
commit
c4e0911f95
|
@ -1001,7 +1001,7 @@ char *object_property_get_str(struct uc_struct *uc, Object *obj, const char *nam
|
||||||
retval = g_strdup(qstring_get_str(qstring));
|
retval = g_strdup(qstring_get_str(qstring));
|
||||||
}
|
}
|
||||||
|
|
||||||
QDECREF(qstring);
|
qobject_decref(ret);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue