Yes, sorry you are correct f'or modern POSIX & ISO C systems (linux, freebsd, solaris). I sometimes forget this because I work with some very old Domain/OS 10.3.5 systems where the C library based on a mix of very ancient SysV/BSD4.3 where freeing a NULL ptr was not as clearly defined. So I think I added the extra NULL check as a safety measure in the process of trying to troubleshoot the problem. My apologies. I should have checked my notes more carefully, and I would have seen this artifact did not affect my testing.
Looking at my notes, the patch you provided to remove the line to "free(conndata->index);" was sufficient to fix the problem I observed.
Sorry for the confusion, and thanks for pointing that out.