summaryrefslogtreecommitdiff
path: root/ctdb/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-05-03 09:34:41 +0000
committerVolker Lendecke <vl@samba.org>2015-05-06 15:37:14 +0200
commitbfbaf51cd627b2d1052dd23be4b0df5e004cc92f (patch)
treefb56b0e05080c9d414961aacdfd94dab318a9f8e /ctdb/utils
parent19b28ee82868e52e200d52fe19456826e5ade7e4 (diff)
downloadsamba-bfbaf51cd627b2d1052dd23be4b0df5e004cc92f.tar.gz
ping_pong: Fix CID 1273087 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'ctdb/utils')
-rw-r--r--ctdb/utils/ping_pong/ping_pong.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/utils/ping_pong/ping_pong.c b/ctdb/utils/ping_pong/ping_pong.c
index 1d134a1462c..fdb575daae2 100644
--- a/ctdb/utils/ping_pong/ping_pong.c
+++ b/ctdb/utils/ping_pong/ping_pong.c
@@ -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;
}