summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-10-12 10:56:44 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-10-12 12:29:31 +0200
commit237030ce2bc23f39ccb4f72f94b3c98e2232ded4 (patch)
tree4a4c688d5fc16991ef2786bc9259ea07a8c6dee7
parent76958f94d4f7a8536dc6fa8676bd8de31bc661c1 (diff)
downloadNetworkManager-237030ce2bc23f39ccb4f72f94b3c98e2232ded4.tar.gz
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
-rw-r--r--libnm-core/nm-setting-ip-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c
index a26be0689b..0bb90a0463 100644
--- a/libnm-core/nm-setting-ip-config.c
+++ b/libnm-core/nm-setting-ip-config.c
@@ -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)