]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Free the smartlist after parsing csv config option
authorMatthew Finkel <Matthew.Finkel@gmail.com>
Wed, 9 Oct 2013 22:49:46 +0000 (22:49 +0000)
committerMatthew Finkel <Matthew.Finkel@gmail.com>
Wed, 9 Oct 2013 23:16:57 +0000 (23:16 +0000)
Bugfix on 1293835440dd4debf6fbfc66e755d9b9384aa362, which implemented
6752: Not in any released tor.

src/or/confparse.c

index f2ada4f420b7080618494b8b17adc7a4d002eeb1..c5400a6512bd2fa6e7bb0a1b56c787c8db921390 100644 (file)
@@ -392,7 +392,7 @@ config_assign_value(const config_format_t *fmt, void *options,
               "Interval in '%s %s' is malformed or out of bounds.",
               c->key, c->value);
           SMARTLIST_FOREACH(csv_str, char *, cp, tor_free(cp));
-          smartlist_clear(csv_str);
+          smartlist_free(csv_str);
           return -1;
         }
         csv_int = tor_malloc_zero(sizeof(int));
@@ -401,7 +401,7 @@ config_assign_value(const config_format_t *fmt, void *options,
       }
     SMARTLIST_FOREACH_END(str);
     SMARTLIST_FOREACH(csv_str, char *, cp, tor_free(cp));
-    smartlist_clear(csv_str);
+    smartlist_free(csv_str);
     break;
 
   case CONFIG_TYPE_LINELIST: