Prakhar Kumar commented on a discussion on cpukit/libblock/src/flashdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_139476 > > return RTEMS_SUCCESSFUL; > } > + > +static void rtems_fdisk_cleanup_helper (rtems_flashdisk *fd) > +{ > + if(!fd) > + return; > + > + uint32_t device; > + > + if(fd->devices) > + { > + for(device = 0; device< fd->device_count; device++) > + { > + free(fd->devices[device].segments); During the allocation calloc is being is used, so its safe to call free on NULL instead of checking. I want to know your suggestions on it, should I change it and NULL check it. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_139476 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
