Certain functions like npnt_alloc_and_get_fence_points which use pointers as arguments are actually pass by value of pointers - the actual corresponding members of the npnt structure will not get updated.
Either directly update those members using the npnt_handle structure, or assign the updated pointers back to the members of npnt_handle structure.