Return-Path: From: "Li, Nami" To: Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" Subject: RE: [PATCH obexd v2] Fix crash introduced by f5279bfcedd669bc5d4e88cc1c59807c92226dfb Date: Thu, 23 Jun 2011 10:25:02 +0000 Message-ID: References: <1308652632-2028-1-git-send-email-luiz.dentz@gmail.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: SGksIEx1aXoNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IGxpbnV4LWJsdWV0 b290aC1vd25lckB2Z2VyLmtlcm5lbC5vcmcgW21haWx0bzpsaW51eC1ibHVldG9vdGgtb3duZXJA dmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgTHVpeiBBdWd1c3RvIHZvbiBEZW50eg0KU2Vu dDogMjAxMeW5tDbmnIgyM+aXpSAxNzoyMA0KVG86IGxpbnV4LWJsdWV0b290aEB2Z2VyLmtlcm5l bC5vcmcNClN1YmplY3Q6IFJlOiBbUEFUQ0ggb2JleGQgdjJdIEZpeCBjcmFzaCBpbnRyb2R1Y2Vk IGJ5IGY1Mjc5YmZjZWRkNjY5YmM1ZDRlODhjYzFjNTk4MDdjOTIyMjZkZmINCg0KSGkgTmFtaSwN Cg0KT24gVHVlLCBKdW4gMjEsIDIwMTEgYXQgMTozNyBQTSwgTHVpeiBBdWd1c3RvIHZvbiBEZW50 eiA8bHVpei5kZW50ekBnbWFpbC5jb20+IHdyb3RlOg0KPiBGcm9tOiBMdWl6IEF1Z3VzdG8gdm9u IERlbnR6IDxsdWl6LnZvbi5kZW50ekBpbnRlbC5jb20+DQo+DQo+IFRoZSBjYWxsYmFjayBmdW5j dGlvbiBhY3R1YWxseSBuZWVkcyB0aGUgYmx1ZXRvb3RoX3NlcnZpY2Ugc3RydWN0dXJlIA0KPiBu b3Qgb2JleF9zZXJ2aWNlX2RyaXZlci4NCj4gLS0tDQo+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