diff options
-rw-r--r-- | mm/list_lru.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/list_lru.c b/mm/list_lru.c index 909eca2c820e..84b4c21d78d7 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -532,6 +532,8 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware, err = memcg_init_list_lru(lru, memcg_aware); if (err) { kfree(lru->node); + /* Do this so a list_lru_destroy() doesn't crash: */ + lru->node = NULL; goto out; } |