Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bindings/lua: take a reference on watch directory
Problem: lua segfaults when garbage collecting kvsdir_t. When a kvs_watch() callback receives a kvsdir_t argument, it is only valid for the duration of the callback. When instantiating a directory as a Lua table that persists after the callback, it looks like we need to call kvsdir_incref() on the directory to avoid illegal access and/or double free during garbage collection.
- Loading branch information