mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
use the tor_malloc_zero wrapper
svn:r837
This commit is contained in:
+1
-2
@@ -340,9 +340,8 @@ list_running_servers(char **nicknames_out)
|
||||
for (i = 0; i<n; ++i) {
|
||||
length += strlen(nickname_lst[i]);
|
||||
}
|
||||
*nicknames_out = tor_malloc(length);
|
||||
*nicknames_out = tor_malloc_zero(length);
|
||||
cp = *nicknames_out;
|
||||
memset(cp,0,length);
|
||||
for (i = 0; i<n; ++i) {
|
||||
if (i)
|
||||
strcat(cp, " ");
|
||||
|
||||
Reference in New Issue
Block a user