diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-19 15:20:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-19 15:20:57 -0400 |
commit | 8cb08f716dea9a62f302cf1f75d487a7a5793217 (patch) | |
tree | 7fbd18d4a6b558ee9e0646f7d97026c4949e7b41 /src/test/test_util.c | |
parent | 4e6b13a38af023976a9b82d1207ae31ea60aecd0 (diff) | |
download | tor-8cb08f716dea9a62f302cf1f75d487a7a5793217.tar.gz tor-8cb08f716dea9a62f302cf1f75d487a7a5793217.zip |
fix a coverity resource leak warning
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index a861f15ab1..0d9dd974df 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5736,7 +5736,7 @@ test_util_get_unquoted_path(void *arg) { (void)arg; - char *r; + char *r = NULL; r = get_unquoted_path("\""); // " tt_ptr_op(r, OP_EQ, NULL); @@ -5804,10 +5804,9 @@ test_util_get_unquoted_path(void *arg) r = get_unquoted_path("\"A\\B\\\"C\""); // "A\B\"C" tt_str_op(r, OP_EQ, "A\\B\"C"); // A\B"C - tor_free(r); done: - ; + tor_free(r); } #define UTIL_LEGACY(name) \ |