Well, I updated my tree (4.5-stable again) and was going through agp_amd.c
to check out the changes, when another gotcha jumped out at me.  At line
113 you allocate the ag_vdir, then bzero it:

        /*
         * Allocate the page directory.
         */
        gatt->ag_vdir = malloc(AGP_PAGE_SIZE, M_AGP, M_NOWAIT);
        bzero(gatt->ag_vdir, AGP_PAGE_SIZE);

        if (!gatt->ag_vdir) {

Looks to me like if the malloc fails the bzero will trap, eh?  The bzero()
should be after the "if (!gatt->ag_vdir)" test.

An extra set of eyes can always be useful, I guess. :-)
-- 
Frank Mayhar [EMAIL PROTECTED]     http://www.exit.com/
Exit Consulting                 http://www.gpsclock.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to