From a4f32e77ef074cd19f0f94ad59bc240c87fd9803 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 10 Sep 2005 02:34:32 +0000 Subject: Fix segfault in win32 unittests. svn:r4983 --- src/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') 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."); -- cgit v1.2.3-54-g00ecf