diff --git a/sys/dev/ath/if_ath_alq.c b/sys/dev/ath/if_ath_alq.c index 1ad13db5e75d..8ca53ae2c579 100644 --- a/sys/dev/ath/if_ath_alq.c +++ b/sys/dev/ath/if_ath_alq.c @@ -184,9 +184,11 @@ if_ath_alq_post(struct if_ath_alq *alq, uint16_t op, uint16_t len, /* * Copy the payload _after_ the header field. */ - memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr), - buf, - len); + if (buf != NULL) { + memcpy(((char *) ap) + sizeof(struct if_ath_alq_hdr), + buf, + len); + } alq_post(alq->sc_alq_alq, ale); }