From owner-cvs-all@FreeBSD.ORG Tue Jul 20 13:16:17 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADF6A16A4CE; Tue, 20 Jul 2004 13:16:17 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A792643D55; Tue, 20 Jul 2004 13:16:17 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6KDGHrc094264; Tue, 20 Jul 2004 13:16:17 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6KDGHtY094263; Tue, 20 Jul 2004 13:16:17 GMT (envelope-from glebius) Message-Id: <200407201316.i6KDGHtY094263@repoman.freebsd.org> From: Gleb Smirnoff Date: Tue, 20 Jul 2004 13:16:17 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netgraph ng_device.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2004 13:16:17 -0000 glebius 2004-07-20 13:16:17 UTC FreeBSD src repository Modified files: sys/netgraph ng_device.c Log: In ng_device_newhook(): - Return meaningful return errorcodes. - Free previously allocated connection in error cases. In ng_device_rcvdata(): - Return meaningful return errorcodes. - Detach mbuf from netgraph item, and free the item before doing any other actions that may return from method. - Do not call strange malloc() for buffer. [1] - In case of any error jump to end, where mbuf is freed. In ng_device_disconnect(): - Return meaningful return errorcodes. - Free disconnected connection. style(9) in mentioned above functions: - Remove '/* NGD_DEBUG */', when only one line is ifdef'ed. - Remove extra braces to easier reading. - Add space after comma in function calls. PR: kern/41881 (part) Reviewed by: marks Approved by: julian (mentor) Revision Changes Path 1.11 +38 -38 src/sys/netgraph/ng_device.c