right above there is if (pkt) {<do stuff>; pkt = NULL}, so pkt is just a fancy name for NULL at this point.