diff options
author | Ben Pfaff <blp@nicira.com> | 2010-02-01 14:57:48 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-02-02 15:21:10 -0800 |
commit | 93ff0290fda0f02904686989243089faaa9229e6 (patch) | |
tree | 251ee36ce71b041689455726d3c0bb29ed91f949 /tests/test-json.c | |
parent | b86b43aa485b5ab613ee6853b58f070db35339c9 (diff) | |
download | openvswitch-93ff0290fda0f02904686989243089faaa9229e6.tar.gz |
tests: Fix memory leaks in test programs.
This makes it easier to see memory leaks in the code under test.
Found with valgrind.
Diffstat (limited to 'tests/test-json.c')
-rw-r--r-- | tests/test-json.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-json.c b/tests/test-json.c index 28b0edf19..f297dc205 100644 --- a/tests/test-json.c +++ b/tests/test-json.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -152,5 +152,7 @@ main(int argc, char *argv[]) ok = print_and_free_json(json_from_stream(stream)); } + fclose(stream); + return !ok; } |