libftdi Archives

Subject: Re: Segmentation fault

From: Lars Lockenvitz <l.lockenvitz@xxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 16 Sep 2009 09:28:06 +0200
Thanks, that was the error. Couse heliosens_usb has more than only ftdi_context!

Thanks a lot!

Lars

Michael Plante schrieb:
Lars,

Could it be these lines?

if((newdev = (struct heliosens_usb *)malloc(sizeof(struct ftdi_context)))
== NULL) {
// [...]

if(ftdi_init(&newdev->ftdic) < 0) {


Unless ftdic is the only member of heliosens_usb, are you sure you allocated
enough memory?

Michael


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread