git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b263bfe
)
Fix CID 1138341 Resource leak
author
Volker Lendecke
<vl@samba.org>
Sun, 15 Dec 2013 19:28:04 +0000
(20:28 +0100)
committer
Jeremy Allison
<jra@samba.org>
Tue, 17 Dec 2013 00:57:12 +0000
(
01:57
+0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/lib/replace/test/testsuite.c
patch
|
blob
|
history
diff --git
a/ctdb/lib/replace/test/testsuite.c
b/ctdb/lib/replace/test/testsuite.c
index 52629ec82e5b3f271e47ab0fd4ab03e5c2dbf62a..387f096552f4ff39db5c294c1af4fbe402d20bfd 100644
(file)
--- a/
ctdb/lib/replace/test/testsuite.c
+++ b/
ctdb/lib/replace/test/testsuite.c
@@
-266,12
+266,14
@@
static int test_strndup(void)
x = strndup("bla", 2);
if (strcmp(x, "bl") != 0) {
printf("failure: strndup [\ninvalid\n]\n");
+ free(x);
return false;
}
free(x);
x = strndup("bla", 10);
if (strcmp(x, "bla") != 0) {
printf("failure: strndup [\ninvalid\n]\n");
+ free(x);
return false;
}
free(x);