This seems to be the result of the programmer misunderstanding strsep()
(unless I'm misunderstanding something). The return value is the
supplied string pointer. Because strsep() is called in a while loop,
each iteration's hn is the last iteration's inputstring. We therefore
have to keep a reference to the allocated string so that we can free it.