diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/if_ath_alq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_alq.c b/sys/dev/ath/if_ath_alq.c index 1ad13db..8ca53ae 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); } |