casaroli commented on code in PR #20583:
URL: https://github.com/apache/nuttx/pull/20583#discussion_r4248099216
##########
libs/libc/environ/env_putenv.c:
##########
@@ -87,7 +87,7 @@ int putenv(FAR const char *string)
ret = setenv(pname, pequal + 1, TRUE);
}
- lib_ufree(pname);
+ lib_free(pname);
Review Comment:
Done: putenv() now allocates its copy with env_malloc() and frees it with
env_free(), so both use the same heap. A plain env_free() on the strdup() copy
would use the wrong heap when kernel code changes a user task's environment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]