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:
9990052
)
tests: fix a memory leak
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Thu, 2 Mar 2017 10:28:24 +0000
(11:28 +0100)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Thu, 2 Mar 2017 10:28:24 +0000
(11:28 +0100)
We must free the error string from a failed test after displaying it.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/unit/gpiod-unit.c
patch
|
blob
|
history
diff --git
a/tests/unit/gpiod-unit.c
b/tests/unit/gpiod-unit.c
index 260edb8578b92f78522414053cbc5b06c203d09f..6550577ac97d5e57c383175f27736dc5acea43b4 100644
(file)
--- a/
tests/unit/gpiod-unit.c
+++ b/
tests/unit/gpiod-unit.c
@@
-442,6
+442,7
@@
int main(int argc GU_UNUSED, char **argv GU_UNUSED)
pr_raw("\n\t\t'%s': %s\n",
test->name, globals.test_ctx.failed_msg);
reset_color();
+ free(globals.test_ctx.failed_msg);
} else {
set_color(CGREEN);
pr_raw("OK\n");