diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-11-02 12:43:40 -0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-11-02 12:43:40 -0200 |
commit | 8c5ad9b304fd405380501f5acd1f7c809a1a2746 (patch) | |
tree | 3b77ffdb176ce2f125142bf7242c8e3dcba9f90d /tests | |
parent | 1faa52052624e7c03256df0c63c43f5d40ddb57a (diff) | |
download | blogc-8c5ad9b304fd405380501f5acd1f7c809a1a2746.tar.gz blogc-8c5ad9b304fd405380501f5acd1f7c809a1a2746.tar.bz2 blogc-8c5ad9b304fd405380501f5acd1f7c809a1a2746.zip |
content-parser: fix memory leak in gcc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check_content_parser.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index 5d13564..8bd16ec 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1026,9 +1026,11 @@ __wrap_blogc_directive_loader(const char *name, const char *argument, assert_string_equal(argument, arg); assert_int_equal(b_trie_size(params), mock_type(unsigned int)); - for (unsigned int i = 0; i < b_trie_size(params); i++) - assert_string_equal(b_trie_lookup(params, mock_type(const char*)), - mock_type(const char*)); + for (unsigned int i = 0; i < b_trie_size(params); i++) { + const char *key = mock_type(const char*); + const char *value = mock_type(const char*); + assert_string_equal(b_trie_lookup(params, key), value); + } return b_strdup("CHUNDA\n"); } |