summaryrefslogtreecommitdiff
path: root/linux/shrinker.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/shrinker.c')
-rw-r--r--linux/shrinker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/shrinker.c b/linux/shrinker.c
index c0098cad..7a8a9a6a 100644
--- a/linux/shrinker.c
+++ b/linux/shrinker.c
@@ -15,6 +15,9 @@ static DEFINE_MUTEX(shrinker_lock);
void shrinker_free(struct shrinker *s)
{
+ if (!s)
+ return;
+
if (s->list.next) {
mutex_lock(&shrinker_lock);
list_del(&s->list);