1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

nsswitch: Fix CID 1518966 Resource leaks (RESOURCE_LEAK)

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-01-09 15:12:45 +13:00 committed by Andrew Bartlett
parent e7baac45a9
commit a34e245bb2

View File

@ -216,6 +216,7 @@ static void *query_wbc_thread(void *ptr)
assert(nwritten == sizeof(int));
exit(1);
}
wbcFreeMemory(ppwd);
printf("child: wbcGetpwnam in child succeeded\n");
rc = 0;
nwritten = write(p[0], &rc, sizeof(int));
@ -253,6 +254,7 @@ static void *query_wbc_thread(void *ptr)
state->fail = true;
return NULL;
}
wbcFreeMemory(ppwd);
printf("parent: wbcGetpwnam in parent succeeded\n");
return NULL;
}