From 9211a3ba80f0300b5476a9c015e4aa80c18e4fbf Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 20 Apr 2011 16:14:12 +0300 Subject: fs-tests: integck: do not forget to free mount_opts The test forgets to free the args.mount_opts string on exit - fix this. Signed-off-by: Artem Bityutskiy --- tests/fs-tests/integrity/integck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 6de4a42..4b9b0f0 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -2416,8 +2416,7 @@ static void parse_mount_options(const char *mount_opts) * so duplicate it. */ tmp = dup_string(mount_opts); - p = opts = calloc(1, strlen(mount_opts) + 1); - CHECK(opts != NULL); + p = opts = zalloc(strlen(mount_opts) + 1); opt = strtok(tmp, ","); while (opt) { @@ -2719,6 +2718,7 @@ int main(int argc, char *argv[]) out_free: free(random_name_buf); + free(fsinfo.mount_opts); free(fsinfo.mount_point); free(fsinfo.fstype); free(fsinfo.fsdev); -- cgit v1.2.3