s4:registry - "dir.c" - fix up dynamic memory allocation operations