summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-08-09 18:49:43 +0000
committerNick Mathewson <nickm@torproject.org>2005-08-09 18:49:43 +0000
commitc031d14633187038cb3032d557daa64378c54fac (patch)
tree06f1c0669cd9d51961218e8445159f1614544e91 /src/or/test.c
parenta6a12c02e334770fca856d6916e57f22c2a75077 (diff)
downloadtor-c031d14633187038cb3032d557daa64378c54fac.tar.gz
tor-c031d14633187038cb3032d557daa64378c54fac.zip
Fix segfault in unit tests
svn:r4760
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 0f0abfd2cd..32413ea196 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -35,6 +35,7 @@ void get_platform_str(char *platform, size_t len);
int is_obsolete_version(const char *myversion, const char *start);
size_t read_escaped_data(const char *data, size_t len, int translate_newlines,
char **out);
+or_options_t *options_new(void);
static char temp_dir[256];
@@ -1522,7 +1523,7 @@ test_rend_fns(void)
int
main(int c, char**v)
{
- or_options_t *options = tor_malloc_zero(sizeof(or_options_t));
+ or_options_t *options = options_new();
network_init();
options_init(options);
set_options(options);