mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Fix segfault in win32 unittests.
svn:r4983
This commit is contained in:
parent
e58ca648c6
commit
a4f32e77ef
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user