Author: adrian
Date: Mon May 13 21:17:27 2013
New Revision: 250618
URL: http://svnweb.freebsd.org/changeset/base/250618

Log:
  Support sending ATH_ALQ messages with no payload.

Modified:
  head/sys/dev/ath/if_ath_alq.c

Modified: head/sys/dev/ath/if_ath_alq.c
==============================================================================
--- head/sys/dev/ath/if_ath_alq.c       Mon May 13 20:28:24 2013        
(r250617)
+++ head/sys/dev/ath/if_ath_alq.c       Mon May 13 21:17:27 2013        
(r250618)
@@ -184,9 +184,11 @@ if_ath_alq_post(struct if_ath_alq *alq, 
        /*
         * 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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to