diff options
author | Roger Dingledine <arma@torproject.org> | 2007-12-16 20:46:23 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-12-16 20:46:23 +0000 |
commit | e70d9a7f4d864a9ad3d2afca24c0087a66605d46 (patch) | |
tree | e79ee059188034b5c5232a52e0c6498bd6431a3b /src/or/routerparse.c | |
parent | 98a56a386df73290e2f97d252d219d95bffa5099 (diff) | |
download | tor-e70d9a7f4d864a9ad3d2afca24c0087a66605d46.tar.gz tor-e70d9a7f4d864a9ad3d2afca24c0087a66605d46.zip |
fix another mem leak, and point out another for karsten
svn:r12841
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index c386a004a5..696271bc54 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3402,7 +3402,7 @@ rend_decrypt_introduction_points(rend_service_descriptor_t *parsed, intro_points_encrypted_size = unenclen; } /* Consider one intro point after the other. */ - current_ipo = (const char **)&intro_points_encrypted; + current_ipo = &intro_points_encrypted; intropoints = smartlist_create(); tokens = smartlist_create(); if (parsed->intro_keys) { @@ -3479,6 +3479,9 @@ rend_decrypt_introduction_points(rend_service_descriptor_t *parsed, tok->key = NULL; /* Prevent free */ /* Add extend info to list of introduction points. */ smartlist_add(intropoints, info); + /* XXX if intropoints has items on it, but we goto err the next + * time through the loop, we don't free the items in the 'err' + * section below. -RD */ } /* Write extend infos to descriptor. */ /* XXXX020 what if intro_points (&tc) are already set? */ @@ -3506,6 +3509,8 @@ rend_decrypt_introduction_points(rend_service_descriptor_t *parsed, SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t)); smartlist_free(tokens); + smartlist_free(intropoints); + return result; } |