[proposal 136] Re: Proposal: Simplify Configuration of Private Tor Networks
Karsten Loesing
karsten.loesing at gmx.net
Wed May 28 12:15:49 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roger Dingledine wrote:
| The var->initvalue = tor_strdup(val) above clobbers the current value of
| var->initvalue. For the first time we assign config options, that's fine,
| since its initial value is from a static table. But for future times we
| assign config options, we'll leak the previous value.
|
| One better approach might be to have a static table of keys (strings)
| and values (strings) for the alternate defaults, and walk through the
| table doing a config_find_option() on the key and then assigning value
| directly from the table (rather than making a copy).
You are right. I fixed that as you proposed (or similarly) and attached
a new patch.
- --Karsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIPUz10M+WPffBEmURArC5AKDEOjP3YKdB93brqPbhuuZ29UwxXQCfRpzp
97KmXg6WLOh9B4LzHWNy/tg=
=EiSl
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch3.txt
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080528/e8bf70dc/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch3.txt.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080528/e8bf70dc/attachment.obj>
More information about the tor-dev
mailing list