projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6914f41
)
tests: fix a memory leak
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Sun, 11 Jun 2017 18:15:50 +0000
(20:15 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Sun, 11 Jun 2017 18:15:50 +0000
(20:15 +0200)
We don't free the string allocated by asprintf() in a test case for
gpioinfo. Fix it.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/tests-gpioinfo.c
patch
|
blob
|
history
diff --git
a/tests/tests-gpioinfo.c
b/tests/tests-gpioinfo.c
index fc7c9408a6af75a992971de0fe9a8499c342d2dc..e2b7419361aad13a658b826772d8c5b2fa790b6d 100644
(file)
--- a/
tests/tests-gpioinfo.c
+++ b/
tests/tests-gpioinfo.c
@@
-34,8
+34,8
@@
TEST_DEFINE(gpioinfo_simple,
static void gpioinfo_one_exported(void)
{
TEST_CLEANUP(test_close_chip) struct gpiod_chip *chip = NULL;
+ TEST_CLEANUP(test_free_str) char *ptrn;
struct gpiod_line *line;
- char *ptrn;
int rv;
rv = asprintf(&ptrn,