aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_ddll.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-20 15:27:43 +0100
committerSverker Eriksson <[email protected]>2018-03-20 17:34:12 +0100
commit902e1df69542e07e7c363f5b599ac1551b8fbb64 (patch)
tree332c649994ea663967a9446bfaf5276f41a7b29a /erts/emulator/beam/erl_bif_ddll.c
parent21e71598fddd8483ff0b43eca0a101aa4e3c024a (diff)
downloadotp-902e1df69542e07e7c363f5b599ac1551b8fbb64.tar.gz
otp-902e1df69542e07e7c363f5b599ac1551b8fbb64.tar.bz2
otp-902e1df69542e07e7c363f5b599ac1551b8fbb64.zip
erts: Add dynamic loaded drivers to list of "taints"
Diffstat (limited to 'erts/emulator/beam/erl_bif_ddll.c')
-rw-r--r--erts/emulator/beam/erl_bif_ddll.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c
index 579e9b12f4..8220ba97a2 100644
--- a/erts/emulator/beam/erl_bif_ddll.c
+++ b/erts/emulator/beam/erl_bif_ddll.c
@@ -1505,6 +1505,15 @@ static int do_load_driver_entry(DE_Handle *dh, char *path, char *name)
res = ERL_DE_LOAD_ERROR_BAD_NAME;
goto error;
}
+
+ {
+ Eterm name_atom = erts_atom_put((byte*)name, sys_strlen(name),
+ ERTS_ATOM_ENC_LATIN1, 0);
+ if (is_non_value(name_atom))
+ goto error;
+ erts_add_taint(name_atom);
+ }
+
erts_atomic_init_nob(&(dh->refc), (erts_aint_t) 0);
erts_atomic32_init_nob(&dh->port_count, 0);
dh->full_path = erts_alloc(ERTS_ALC_T_DDLL_HANDLE, sys_strlen(path) + 1);