[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] prop224: Fix memleaks in hs descriptor unit test



commit c1bbc8405b8f1624d008688627303911b93e7fb0
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Fri Nov 4 14:45:37 2016 -0400

    prop224: Fix memleaks in hs descriptor unit test
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/test/test_hs_descriptor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 5ddb4d0..8377a45 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -972,6 +972,7 @@ test_decode_plaintext(void *arg)
     char *plaintext;
     tor_asprintf(&plaintext, template, "3", bad_value, "42", "MESSAGE");
     ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext);
+    tor_free(plaintext);
     tt_int_op(ret, OP_EQ, -1);
   }
 
@@ -980,6 +981,7 @@ test_decode_plaintext(void *arg)
     char *plaintext;
     tor_asprintf(&plaintext, template, "3", "7181615", "42", "MESSAGE");
     ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext);
+    tor_free(plaintext);
     tt_int_op(ret, OP_EQ, -1);
   }
 
@@ -988,6 +990,7 @@ test_decode_plaintext(void *arg)
     char *plaintext;
     tor_asprintf(&plaintext, template, "3", "180", "42", bad_value);
     ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext);
+    tor_free(plaintext);
     tt_int_op(ret, OP_EQ, -1);
   }
 
@@ -996,6 +999,7 @@ test_decode_plaintext(void *arg)
     char *plaintext;
     tor_asprintf(&plaintext, template, "3", "180", bad_value, "MESSAGE");
     ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext);
+    tor_free(plaintext);
     tt_int_op(ret, OP_EQ, -1);
   }
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits