From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 14:47:42 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF1D416A41F for ; Fri, 29 Jul 2005 14:47:42 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta9.adelphia.net (mta9.adelphia.net [68.168.78.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4782843D45 for ; Fri, 29 Jul 2005 14:47:42 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.222.48]) by mta9.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050729144738.CJLR29002.mta9.adelphia.net@[192.168.1.254]>; Fri, 29 Jul 2005 10:47:38 -0400 Message-ID: <42EA4193.8090401@savvis.net> Date: Fri, 29 Jul 2005 07:47:47 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver References: <20050728113713.2925.5@@vodafone.es> <42E90D5E.3030404@savvis.net> <20050728193757.15889.2@@vodafone.es> <42E920D9.7050907@savvis.net> <20050729145152.6600.1@@vodafone.es> In-Reply-To: <20050729145152.6600.1@@vodafone.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Could check this? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 14:47:42 -0000 Oliver, > In file ng_l2cap_llpi.c func ng_l2cap_lp_con_ind(...) > concretely line:251: > > /* Create and send LP_ConnectRsp event */ > NG_MKMESSAGE(rsp, NGM_HCI_COOKIE, NGM_HCI_LP_CON_RSP, > sizeof(*rp), M_NOWAIT); > if (msg == NULL) { > ng_l2cap_free_con(con); > error = ENOMEM; > goto out; > } > > NG_MKMESSAGE function creates a NG_MESSAGE called rsp? for being send with > NG_SEND_MSG_HOOK afterwards, am I right? yes, you are right > if it is, shouldnt we be cheking the rsp pointer instead of msg ? > ...the msg pointer is used much before in this func...so if it was NULL it > should have crashed much before... yes, its a bug/typo. thank you for finding and submitting it. > Am I missing something? no, fix committed to -current. === emax 2005-07-29 14:44:17 UTC FreeBSD src repository Modified files: sys/netgraph/bluetooth/l2cap ng_l2cap_llpi.c Log: Fix typo and check correct (rsp) pointer against the NULL value. Submitted by: Oliver < urnenfel at tiscali dot es > MFC after: 1 day Revision Changes Path 1.9 +1 -1 src/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c thanks, max