Author: ae
Date: Thu Jan 23 19:07:22 2014
New Revision: 261084
URL: http://svnweb.freebsd.org/changeset/base/261084

Log:
  malloc() with M_WAITOK doesn't return NULL.
  
  MFC after:    1 week

Modified:
  head/sys/geom/geom_ctl.c

Modified: head/sys/geom/geom_ctl.c
==============================================================================
--- head/sys/geom/geom_ctl.c    Thu Jan 23 18:09:10 2014        (r261083)
+++ head/sys/geom/geom_ctl.c    Thu Jan 23 19:07:22 2014        (r261084)
@@ -122,10 +122,7 @@ geom_alloc_copyin(struct gctl_req *req, 
        void *ptr;
 
        ptr = g_malloc(len, M_WAITOK);
-       if (ptr == NULL)
-               req->nerror = ENOMEM;
-       else
-               req->nerror = copyin(uaddr, ptr, len);
+       nreq->nerror = copyin(uaddr, ptr, len);
        if (!req->nerror)
                return (ptr);
        if (ptr != NULL)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to