From 5086df9f1f3925734229495b3e467c0ba6c07346 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Mon, 13 May 2013 21:17:27 +0000 Subject: [PATCH] Support sending ATH_ALQ messages with no payload. --- sys/dev/ath/if_ath_alq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); }