Skip to content
Snippets Groups Projects
Commit 7eee3ceb authored by Matt Johnston's avatar Matt Johnston
Browse files

comment about putenv() leaking malloced variables

--HG--
extra : convert_revision : 80deca87cb2af2dde457882170b9095eeb9c2edb
parent 19b89a0e
No related merge requests found
......@@ -997,6 +997,7 @@ void addnewvar(const char* param, const char* var) {
newvar[plen] = '=';
memcpy(&newvar[plen+1], var, vlen);
newvar[plen+vlen+1] = '\0';
/* newvar is leaked here, but that's part of putenv()'s semantics */
if (putenv(newvar) < 0) {
dropbear_exit("environ error");
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment