mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 14:00:05 +01:00
libnm: specify (transfer none) introspection annotation (bgo #756380)
Otherwise the callers would free the address and it would result in double-free. Ideally, the function would return const pointer, but changing it now would require changing also other prototypes and much code due to snowball effect of const. https://bugzilla.gnome.org/show_bug.cgi?id=756380
This commit is contained in:
parent
76958f94d4
commit
237030ce2b
1 changed files with 2 additions and 2 deletions
|
|
@ -1661,7 +1661,7 @@ nm_setting_ip_config_get_num_addresses (NMSettingIPConfig *setting)
|
|||
* @setting: the #NMSettingIPConfig
|
||||
* @idx: index number of the address to return
|
||||
*
|
||||
* Returns: the address at index @idx
|
||||
* Returns: (transfer none): the address at index @idx
|
||||
**/
|
||||
NMIPAddress *
|
||||
nm_setting_ip_config_get_address (NMSettingIPConfig *setting, int idx)
|
||||
|
|
@ -1813,7 +1813,7 @@ nm_setting_ip_config_get_num_routes (NMSettingIPConfig *setting)
|
|||
* @setting: the #NMSettingIPConfig
|
||||
* @idx: index number of the route to return
|
||||
*
|
||||
* Returns: the route at index @idx
|
||||
* Returns: (transfer none): the route at index @idx
|
||||
**/
|
||||
NMIPRoute *
|
||||
nm_setting_ip_config_get_route (NMSettingIPConfig *setting, int idx)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue