Return-Path: From: Michael Mauch To: bluez-users@lists.sourceforge.net Message-ID: <20060524212831.GA3447@elmicha.333200002251-0001.dialin.t-online.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Subject: [Bluez-users] Re: Found errors Sender: bluez-users-admin@lists.sourceforge.net Errors-To: bluez-users-admin@lists.sourceforge.net Reply-To: bluez-users@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ users List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 24 May 2006 23:28:32 +0200 Gloria Saripah Patara wrote: > Hello, Friends. I want ask you, about error messages. > Did you find this kind of message? > -------- Can't establish OBEX connection : Host is down ----------- > I use perror to print the message. And function that raises the > message is BtOBEX_TransportConnect(...., ...., ....., ....) > > inside this message i attached my code. >From your code: ii = (inquiry_info*)malloc(max_rsp * sizeof(inquiry_info)); free(ii); return (ii->bdaddr); That's wrong. After you freed ii, you are not allowed to access it anymore. You may only access malloced variables between the malloc() and the free(). After free(), the system may overwrite the contents of the allocated memory. Michael ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users