Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2005 07:47:47 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Oliver <urnenfel@tiscali.es>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Could check this?
Message-ID:  <42EA4193.8090401@savvis.net>
In-Reply-To: <20050729145152.6600.1@@vodafone.es>
References:  <20050728113713.2925.5@@vodafone.es>	<42E90D5E.3030404@savvis.net> <20050728193757.15889.2@@vodafone.es>	<42E920D9.7050907@savvis.net> <20050729145152.6600.1@@vodafone.es>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42EA4193.8090401>