20 lines
442 B
Plaintext
20 lines
442 B
Plaintext
$OpenBSD: patch-Vector_c,v 1.2 2018/07/26 12:49:04 ians Exp $
|
|
|
|
This function is called at the wrong time and will cause use-after-free's,
|
|
so we leak for now.
|
|
|
|
Index: Vector.c
|
|
--- Vector.c.orig
|
|
+++ Vector.c
|
|
@@ -53,8 +53,8 @@ void Vector_delete(Vector* this) {
|
|
if (this->array[i])
|
|
Object_delete(this->array[i]);
|
|
}
|
|
- free(this->array);
|
|
- free(this);
|
|
+ /* free(this->array);
|
|
+ free(this); */
|
|
}
|
|
|
|
#ifdef DEBUG
|