1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

ping_pong: Fix CID 1273087 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
This commit is contained in:
Volker Lendecke 2015-05-03 09:34:41 +00:00
parent 19b28ee828
commit bfbaf51cd6

View File

@ -141,6 +141,7 @@ static void ping_pong(int fd, int num_locks)
val = (unsigned char *)calloc(num_locks+1, sizeof(unsigned char));
if (val == NULL) {
printf("calloc failed\n");
munmap(p, num_locks+1);
return;
}