diff options
-rw-r--r-- | c_src/sd_notify.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/c_src/sd_notify.c b/c_src/sd_notify.c index d667fb2..ec77080 100644 --- a/c_src/sd_notify.c +++ b/c_src/sd_notify.c @@ -52,7 +52,6 @@ static ERL_NIF_TERM sd_pid_notify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE unsigned int length = 0; enif_get_list_length(env, argv[2], &length); - char* state = (char*)enif_alloc(++length); enif_get_string(env, argv[1], state, length, ERL_NIF_LATIN1); int result = sd_pid_notify(pid, unset_environment, state); @@ -69,4 +68,4 @@ static ErlNifFunc nif_funcs[] = }; -ERL_NIF_INIT(sd_notify, nif_funcs, NULL, NULL, NULL, NULL);
\ No newline at end of file +ERL_NIF_INIT(sd_notify, nif_funcs, NULL, NULL, NULL, NULL); |