OSDN Git Service

Fix reduce_allocation().
authorTing-Yuan Huang <laszio@google.com>
Tue, 29 Aug 2017 23:05:31 +0000 (16:05 -0700)
committerTing-Yuan Huang <laszio@google.com>
Tue, 12 Sep 2017 22:48:16 +0000 (15:48 -0700)
alloc->list.last was repeatedly freed.

Test: built without seeing warnings.
Change-Id: Ia8b2f9d4b8ba9fbe13fae5d7a0a4d526ddc863d6

ext4_utils/allocate.c

index 00f2203..5f6347d 100644 (file)
@@ -255,6 +255,7 @@ void reduce_allocation(struct block_allocation *alloc, u32 len)
                        len -= last_reg->len;
                        if (reg) {
                                reg->next = NULL;
+                               alloc->list.last = reg;
                        } else {
                                alloc->list.first = NULL;
                                alloc->list.last = NULL;