summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-09-07 16:13:36 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-07 18:41:22 +0200
commit19fc1de9fc5fda0db672231785bea3f3ae098fca (patch)
tree77a8286189f2b2c6efd50506079f5028fdc3a5b0 /configure
parentecbaa69d71992e6447df7b40b0c4e0dc6f255654 (diff)
Use setenv in qputenv if possible, since it won't leak
putenv(3) is evil: SUSv2 requires that the pointer passed to it be added to the environment and that modifying the contents of that pointer later will also cause the environment to change. That means we needed to strdup before calling it and that memory was never freed. This shows up all the time in valgrind's leak check. Instead, let's use the 4.3BSD & POSIX.1-2001 setenv(3) function, which does copy. That means there are either no leaks or, if there are, they're not our fault. Change-Id: I4576f91cc718b6b3cae790c4f2854c4976dded37 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions