mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Fix CID 1138341 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
b263bfef2f
commit
b2937fd618
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user