[california/wip/731543-attendees] Fixes memory double-free bug
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/731543-attendees] Fixes memory double-free bug
- Date: Thu, 13 Nov 2014 04:02:52 +0000 (UTC)
commit b3a24a07d31b3f0f5bd9c808642ac21ab3b7800c
Author: Jim Nelson <jim yorba org>
Date: Wed Nov 12 20:02:39 2014 -0800
Fixes memory double-free bug
src/component/component-person.vala | 6 ++++--
vapi/libical.vapi | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/component/component-person.vala b/src/component/component-person.vala
index 12b6d0c..d38554d 100644
--- a/src/component/component-person.vala
+++ b/src/component/component-person.vala
@@ -198,8 +198,10 @@ public class Person : BaseObject, Gee.Hashable<Person>, Gee.Comparable<Person> {
assert_not_reached();
}
- foreach (string parameter in parameters)
- prop.add_parameter(new iCal.icalparameter.from_string(parameter));
+ foreach (string parameter in parameters) {
+ iCal.icalparameter param = new iCal.icalparameter.from_string(parameter);
+ prop.add_parameter((owned) param);
+ }
return prop;
}
diff --git a/vapi/libical.vapi b/vapi/libical.vapi
index 5ad3c1a..9868c8c 100644
--- a/vapi/libical.vapi
+++ b/vapi/libical.vapi
@@ -499,7 +499,7 @@ namespace iCal {
[CCode (cname = "icalproperty_new_action", has_construct_function = false)]
public icalproperty.action (iCal.icalproperty_action v);
[CCode (cname = "icalproperty_add_parameter")]
- public void add_parameter (iCal.icalparameter parameter);
+ public void add_parameter (owned iCal.icalparameter parameter);
[CCode (cname = "icalproperty_add_parameters")]
public static void add_parameters (iCal.icalproperty prop, void* args);
[CCode (cname = "icalproperty_new_allowconflict", has_construct_function = false)]
@@ -1009,7 +1009,7 @@ namespace iCal {
[CCode (cname = "icalproperty_set_owner")]
public void set_owner (string v);
[CCode (cname = "icalproperty_set_parameter")]
- public void set_parameter (iCal.icalparameter parameter);
+ public void set_parameter (owned iCal.icalparameter parameter);
[CCode (cname = "icalproperty_set_parameter_from_string")]
public void set_parameter_from_string (string name, string value);
[CCode (cname = "icalproperty_set_percentcomplete")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]