Permalink
Browse files

Fix hot code upgrades

  • Loading branch information...
1 parent 5eea00e commit 0bf440d141f467b07970833b4f94669dc21af0e3 @davisp committed Jun 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 c_src/jiffy.c
View
@@ -42,8 +42,8 @@ reload(ErlNifEnv* env, void** priv, ERL_NIF_TERM info)
static int
upgrade(ErlNifEnv* env, void** priv, void** old_priv, ERL_NIF_TERM info)
{
- *priv = *old_priv;
- return 0;
+ enif_free(*old_priv);
+ return load(env, priv, info);
}
static void

0 comments on commit 0bf440d

Please sign in to comment.