dir: Remove double release in FindBlobs
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 11 Oct 2011 00:01:26 +0000 (19:01 -0500)
committerDerrick Brashear <shadow@dementix.org>
Sun, 23 Oct 2011 23:10:35 +0000 (16:10 -0700)
When DRead() fails, we DRelease the entrybuf, then break. However,
this break takes us to the end of the function, where we promptly
DRelease again, causing a double free

Change-Id: I5a0293990e01376525d8adae25477c64e2cc93ad
Reviewed-on: http://gerrit.openafs.org/5655
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/dir/dir.c

index 9e31cee..521145b 100644 (file)
@@ -235,7 +235,6 @@ FindBlobs(dir_file_t dir, int nblobs)
 
            /* read the page in. */
            if (DRead(dir, i, &pagebuf) != 0) {
-               DRelease(&headerbuf, 1);
                break;
            }
            pp = (struct PageHeader *)pagebuf.data;