diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-10 02:34:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-10 02:34:32 +0000 |
commit | a4f32e77ef074cd19f0f94ad59bc240c87fd9803 (patch) | |
tree | 63b509c4fa54827ce2e8530ad38d5b677e3baaef /src/common/util.c | |
parent | e58ca648c6d5fe868def7ee45da1bc3e24352892 (diff) | |
download | tor-a4f32e77ef074cd19f0f94ad59bc240c87fd9803.tar.gz tor-a4f32e77ef074cd19f0f94ad59bc240c87fd9803.zip |
Fix segfault in win32 unittests.
svn:r4983
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 446a5702d0..8805ef053a 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1139,7 +1139,7 @@ tor_listdir(const char *dirname) } result = smartlist_create(); while (1) { - smartlist_add(result, findData.cFileName); + smartlist_add(result, tor_strdup(findData.cFileName)); if (!FindNextFile(handle, &findData)) { if (GetLastError() != ERROR_NO_MORE_FILES) { log_fn(LOG_WARN, "Error reading directory."); |