diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-11 09:17:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-11 09:17:13 -0400 |
commit | 43a47ae7265e0030e0e275fbf01caf1c313710e3 (patch) | |
tree | 47156d1511a66f4316566d91ba7bf66303e3e219 /src/test/test_pt.c | |
parent | 2914d56ea4c767bbfa956afba64032c90a27f4eb (diff) | |
download | tor-43a47ae7265e0030e0e275fbf01caf1c313710e3.tar.gz tor-43a47ae7265e0030e0e275fbf01caf1c313710e3.zip |
Use tor_malloc_zero() in pt tests
Fixes for PT tests merged with 8402; patch from Yawning.
Diffstat (limited to 'src/test/test_pt.c')
-rw-r--r-- | src/test/test_pt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_pt.c b/src/test/test_pt.c index b45151e8b7..05ba24e65a 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -33,7 +33,7 @@ test_pt_parsing(void) transport_t *transport = NULL; tor_addr_t test_addr; - managed_proxy_t *mp = tor_malloc(sizeof(managed_proxy_t)); + managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t)); mp->conf_state = PT_PROTO_INFANT; mp->transports = smartlist_new(); @@ -363,7 +363,7 @@ test_pt_configure_proxy(void *arg) control_testing_set_global_event_mask(EVENT_TRANSPORT_LAUNCHED); - mp = tor_malloc(sizeof(managed_proxy_t)); + mp = tor_malloc_zero(sizeof(managed_proxy_t)); mp->conf_state = PT_PROTO_ACCEPTING_METHODS; mp->transports = smartlist_new(); mp->transports_to_launch = smartlist_new(); |