Fix buffer leak in dir/buffers.c
authorRod Widdowson <rdw@steadingsoftware.com>
Fri, 23 Sep 2011 15:37:43 +0000 (16:37 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 23 Sep 2011 16:36:15 +0000 (09:36 -0700)
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 <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/dir/dir.c

index 570c2db..9e31cee 100644 (file)
@@ -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, ".")) {