use the tor_malloc_zero wrapper

svn:r837
This commit is contained in:
Roger Dingledine
2003-11-18 08:20:19 +00:00
parent ec02f83f94
commit ac56486bf6
7 changed files with 13 additions and 21 deletions
+1 -2
View File
@@ -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, " ");