From c2f7627a89e50713dc963ece2ef086cd991c15aa Mon Sep 17 00:00:00 2001 From: Rod Widdowson Date: Fri, 23 Sep 2011 16:37:43 +0100 Subject: [PATCH] Fix buffer leak in dir/buffers.c Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently threw in a trailing semicolon after an if statement. Since the next line was a break this had several unfortunate side effects, the most obvious being that we leaked a buffer in certain cases. Change-Id: I4f1043426cac22c70b64731c98ac858d82e2f11e Reviewed-on: http://gerrit.openafs.org/5498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/dir/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dir/dir.c b/src/dir/dir.c index 570c2dbe64..9e31cee4a5 100644 --- a/src/dir/dir.c +++ b/src/dir/dir.c @@ -473,7 +473,7 @@ afs_dir_IsEmpty(dir_file_t dir) while (num != 0 && elements < BIGMAXPAGES * EPP) { elements++; /* Walk down the hash table list. */ - if (afs_dir_GetVerifiedBlob(dir, num, &entrybuf) != 0); + if (afs_dir_GetVerifiedBlob(dir, num, &entrybuf) != 0) break; ep = (struct DirEntry *)entrybuf.data; if (strcmp(ep->name, "..") && strcmp(ep->name, ".")) {