[vala/tintou/garray: 10/12] glib-2.0: Avoid double-free in GLib.Array if clear_func is set
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/tintou/garray: 10/12] glib-2.0: Avoid double-free in GLib.Array if clear_func is set
- Date: Fri, 16 Nov 2018 17:49:14 +0000 (UTC)
commit 168b4efda30dd9bca16a6ea101b49f0e4ac36ac2
Author: Corentin Noël <corentin elementary io>
Date: Fri Nov 16 14:55:00 2018 +0100
glib-2.0: Avoid double-free in GLib.Array if clear_func is set
vapi/glib-2.0.vapi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 39a7a361c..fee5c1d7f 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -5295,14 +5295,14 @@ namespace GLib {
[CCode (cname = "vala_g_array_remove_index")]
public G remove_index (uint index) {
assert (length > index);
- G g = data[index];
+ G g = (owned) data[index];
_remove_index (index);
return g;
}
[CCode (cname = "vala_g_array_remove_index_fast")]
public G remove_index_fast (uint index) {
assert (length > index);
- G g = data[index];
+ G g = (owned) data[index];
_remove_index_fast (index);
return g;
}
@@ -5311,7 +5311,7 @@ namespace GLib {
assert (this.length >= index + length);
G[] ga = new G[length];
for (uint i = 0; i < length; i++) {
- ga[i] = data[i + index];
+ ga[i] = (owned) data[i + index];
}
_remove_range (index, length);
return ga;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]