Make the pt/transports test not crash.

This commit is contained in:
Nick Mathewson 2011-11-25 16:54:06 -05:00
parent d6c18c5804
commit b1bd30c24c
2 changed files with 2 additions and 4 deletions

View File

@ -699,9 +699,7 @@ handle_proxy_line(const char *line, managed_proxy_t *mp)
err:
mp->conf_state = PT_PROTO_BROKEN;
log_warn(LD_CONFIG, "Managed proxy at '%s' failed the configuration protocol"
" and will be destroyed.", mp->argv[0]);
return;
" and will be destroyed.", mp->argv ? mp->argv[0] : "");
}
/** Parses an ENV-ERROR <b>line</b> and warns the user accordingly. */

View File

@ -91,7 +91,7 @@ test_pt_protocol(void)
{
char line[200];
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_LAUNCHED;
mp->transports = smartlist_create();