@wkampich commented on this pull request.
pkg_free(ptr); - ptr = NULL; + *held = NULL; +} + +/* + * lost_copy_string(str, int*) {
yes true `pkg_str_dup(..)` would be an option; basically I only use the function when a pointer to a string is necessary and requires zero termination