Pavel Pisa commented on a discussion on cpukit/dev/can/ctucanfd/ctucanfd.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108449

 > +
 > +  chip = malloc( sizeof( struct can_chip ) );
 > +  if ( chip == NULL ) {
 > +    free( priv );
 > +    return NULL;
 > +  }
 > +
 > +  memset( chip, 0, sizeof( struct can_chip ) );
 > +
 > +  chip->qends_dev = malloc( sizeof( struct canque_ends_dev_t ) );
 > +  if ( chip->qends_dev == NULL ) {
 > +    free( priv );
 > +    free( chip );
 > +    return NULL;
 > +  }
 > +

Possible but not necessary, because it will be overwritten by later 
canqueue_ends_init_chip.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108449
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to