diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 0aa953cc520edfbe67e7d47cd9f9c1994bfafd03..8cdeb45b7fd3de943720d9c327b27c481f868e79 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3711,11 +3711,10 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
     if (ns->type != NS_TYPE_CONSENSUS) {
       vote_routerstatus_t *rs = tor_malloc_zero(sizeof(vote_routerstatus_t));
       if (routerstatus_parse_entry_from_string(rs_area, &s, rs_tokens, ns,
-                                               rs, 0, 0))
+                                               rs, 0, 0)) {
         smartlist_add(ns->routerstatus_list, rs);
-      else {
-        tor_free(rs->version);
-        tor_free(rs);
+      } else {
+        vote_routerstatus_free(rs);
       }
     } else {
       routerstatus_t *rs;