change log for rtems (2010-06-10)
Chris Johns
chrisj at rtems.org
Thu Jun 10 22:38:53 UTC 2010
On 10/06/10 9:11 PM, rtems-vc at rtems.org wrote:
> @@ -213,7 +203,6 @@
> */
>
> rtems_filesystem_freenode( fs_mount_loc );
> - free( (void*) mt_entry->target );
> free( mt_entry );
>
This change is broken. I see you have removed the strdup from the mount
command. You cannot assume the target memory supplied to mount is always
present. It may have been allocated on the heap and returned to the heap
after. My original code handled the target cleanly and I did not sorry
about the source as it was already coping by reference. I think both
need to be handled with a copy by value. I can see cases where sprintf
happens in a loop with a stack based buffer for multiple devices.
Chris
More information about the vc
mailing list