silence use after the free clang analyzer warning
scan-build from clang version 9 complains about following:
nl.c:507:9: warning: Use of memory after it is freed
while (nlmsg_ok(hdr, n)) {
^~~~~~~~~~~~~~~~
which seems to be impossible codepath as clang analyzer doesn't somehow
account properly nl_syserr2nlerr(errno) return value:
} else {
free(msg.msg_control);
free(*buf);
return -nl_syserr2nlerr(errno);
}
which should be always < 0, but analyzer is still checking for > 0 code
path as well for some reason. So in order to make the analyzer happy,
set the buf pointer to NULL explicitly and add assert to make it clear,
that this codepath should never happen.
Signed-off-by: Petr Štetiar <ynezz@true.cz>