[Bug 1621] Coverage Improvement: privateenv.c
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Tue Jan 25 20:26:19 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1621
--- Comment #8 from Joel Sherrill <joel.sherrill at oarcorp.com> 2011-01-25 14:26:18 CST ---
(In reply to comment #7)
> To add to what I've said, if free_user_env is called only from
> rtems_libio_share_private_env, the check "env != &rtems_global_user_env" in
> free_user_env can be removed and this PR can be closed. Any comments?
I think this analysis is correct. free_user_env() is static and only called
in two cases:
+ as the destructor for the task variable and it is definitely allocated memory
+ the case where we share our environment with another task whose environment
is not the global one. In this case, we are free'ing a malloc'ed one.
Do you have a patch to address this? And to add some comments about why it is
safe not to check for the global one.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list