Author: emaste
Date: Fri Aug 30 00:40:08 2019
New Revision: 351621
URL: https://svnweb.freebsd.org/changeset/base/351621

Log:
  xdma: avoid NULL deref in error case
  
  Reported by:  Dr Silvio Cesare of InfoSect
  MFC after:    3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/xdma/xdma_sg.c

Modified: head/sys/dev/xdma/xdma_sg.c
==============================================================================
--- head/sys/dev/xdma/xdma_sg.c Fri Aug 30 00:38:16 2019        (r351620)
+++ head/sys/dev/xdma/xdma_sg.c Fri Aug 30 00:40:08 2019        (r351621)
@@ -186,8 +186,7 @@ xchan_bufs_alloc(xdma_channel_t *xchan)
        xdma = xchan->xdma;
 
        if (xdma == NULL) {
-               device_printf(xdma->dev,
-                   "%s: Channel was not allocated properly.\n", __func__);
+               printf("%s: Channel was not allocated properly.\n", __func__);
                return (-1);
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to