public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] kernel/io/disktest: cleanup upon failure occurs
@ 2015-11-24  6:08 Wei Jiangang
  2015-11-24  6:08 ` [LTP] [PATCH 2/2] Fix the order between 2>&1 and >/dev/null Wei Jiangang
  2015-11-24  6:19 ` [LTP] [PATCH " Wei, Jiangang
  0 siblings, 2 replies; 12+ messages in thread
From: Wei Jiangang @ 2015-11-24  6:08 UTC (permalink / raw)
  To: ltp

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 testcases/kernel/io/disktest/dump.c | 2 ++
 testcases/kernel/io/disktest/main.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/testcases/kernel/io/disktest/dump.c b/testcases/kernel/io/disktest/dump.c
index 615e8b4..d83e571 100644
--- a/testcases/kernel/io/disktest/dump.c
+++ b/testcases/kernel/io/disktest/dump.c
@@ -192,12 +192,14 @@ int do_dump(child_args_t * args)
 		pMsg(ERR, args, "could not open %s.\n", args->device);
 		pMsg(ERR, args, "%s: Error = %u\n", args->device,
 		     GETLASTERROR());
+                FREE(buff);
 		return (-1);
 	}
 
 	TargetLBA = Seek(fd, args->start_lba * BLK_SIZE);
 	if (TargetLBA != (args->start_lba * (OFF_T) BLK_SIZE)) {
 		pMsg(ERR, args, "Could not seek to start position.\n");
+                FREE(buf);
 		CLOSE(fd);
 		return (-1);
 	}
diff --git a/testcases/kernel/io/disktest/main.c b/testcases/kernel/io/disktest/main.c
index 9484ec1..050ddea 100644
--- a/testcases/kernel/io/disktest/main.c
+++ b/testcases/kernel/io/disktest/main.c
@@ -501,6 +501,7 @@ test_ll_t *run()
 			     &cleanArgs,
 			     "%s is not a regular file, could not be opened for reading, or was not found.",
 			     filespec);
+                        FREE(aFilespec);
 
 			return newTest;
 		}
-- 
1.9.3


-- 
This message has been scanned for viruses and
dangerous content by FCNIC, and is
believed to be clean.


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-11-26 12:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-24  6:08 [LTP] [PATCH 1/2] kernel/io/disktest: cleanup upon failure occurs Wei Jiangang
2015-11-24  6:08 ` [LTP] [PATCH 2/2] Fix the order between 2>&1 and >/dev/null Wei Jiangang
2015-11-24  6:21   ` [LTP] [PATCH v2 1/2] kernel/io/disktest: cleanup upon failure occurs Wei Jiangang
2015-11-24  6:21     ` [LTP] [PATCH v2 2/2] Fix the order between 2>&1 and >/dev/null Wei Jiangang
2015-11-24 14:10       ` Cyril Hrubis
2015-11-25  1:25         ` Wei, Jiangang
2015-11-25  1:34       ` [LTP] [PATCH v3 1/2] kernel/io/disktest: cleanup upon failure occurs Wei Jiangang
2015-11-25  1:34         ` [LTP] [PATCH v3 2/2] fix the redirection order Wei Jiangang
2015-11-26 12:43           ` Cyril Hrubis
2015-11-24 14:08     ` [LTP] [PATCH v2 1/2] kernel/io/disktest: cleanup upon failure occurs Cyril Hrubis
2015-11-25  1:27       ` Wei, Jiangang
2015-11-24  6:19 ` [LTP] [PATCH " Wei, Jiangang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox