aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-03 15:22:48 +0100
committerSverker Eriksson <[email protected]>2017-02-03 17:23:35 +0100
commit3fe6f3c0caecec522c7e14353eda6bbb86c9e8d6 (patch)
tree29710e0dcc08a4798d61027f2f7762a0fc275ad8 /erts/emulator/beam/global.h
parent69b928b12d9206d00879c08e46143f599f9dc34e (diff)
downloadotp-3fe6f3c0caecec522c7e14353eda6bbb86c9e8d6.tar.gz
otp-3fe6f3c0caecec522c7e14353eda6bbb86c9e8d6.tar.bz2
otp-3fe6f3c0caecec522c7e14353eda6bbb86c9e8d6.zip
erts: Add deallocation veto for magic destructors
A magic destructor can return 0 and thereby take control and prolong the lifetime of a magic binary.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 2158f54a49..91e5bbbd98 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -274,7 +274,7 @@ typedef struct binary {
typedef struct {
ERTS_INTERNAL_BINARY_FIELDS
SWord orig_size;
- void (*destructor)(Binary *);
+ int (*destructor)(Binary *);
union {
struct {
ERTS_BINARY_STRUCT_ALIGNMENT