aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-08-31 22:14:38 -0400
committerNick Mathewson <nickm@torproject.org>2011-08-31 22:14:38 -0400
commit6a3e4a89a24fc1e776b84f55ff884b88ef78ceb3 (patch)
treed6de8a163206fb0585dd641230e62c0439d66c4b /src/test
parent5b8a20ed447f11cda2e0bf528dd78e41e4b76fa4 (diff)
downloadtor-6a3e4a89a24fc1e776b84f55ff884b88ef78ceb3.tar.gz
tor-6a3e4a89a24fc1e776b84f55ff884b88ef78ceb3.zip
Tweaks on last process-launch patches
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 336f95b14f..06c1be3e3a 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -1647,8 +1647,7 @@ test_util_split_lines(void *ptr)
for (i=0; tests[i].orig_line; i++) {
sl = smartlist_create();
/* Allocate space for string and trailing NULL */
- orig_line = tor_malloc(tests[i].orig_length + 1);
- memcpy(orig_line, tests[i].orig_line, tests[i].orig_length + 1);
+ orig_line = tor_memdup(tests[i].orig_line, tests[i].orig_length + 1);
tor_split_lines(sl, orig_line, tests[i].orig_length);
j = 0;