1
0
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:
Volker Lendecke 2013-12-15 20:28:04 +01:00 committed by Jeremy Allison
parent b263bfef2f
commit b2937fd618

View File

@ -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);