From 576881217f04b6938f3dd8e15ce93ad6fa3170cd Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 14 May 2011 22:42:28 +0200 Subject: [PATCH] * grub-core/kern/dl.c (grub_dl_load_file): Decrease ref counter rather than resetting it to allow modules to reference themselves in init. --- ChangeLog | 6 ++++++ grub-core/kern/dl.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6777eb0f4..429467d02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-05-14 Vladimir Serbinenko + + * grub-core/kern/dl.c (grub_dl_load_file): Decrease ref counter + rather than resetting it to allow modules to reference themselves + in init. + 2011-05-14 Vladimir Serbinenko * grub-core/kern/dl.c (grub_dl_unload): Don't decrease reference diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 6104f229e..623e0cbcb 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern/dl.c @@ -626,7 +626,7 @@ grub_dl_load_file (const char *filename) return 0; } - mod->ref_count = 0; + mod->ref_count--; return mod; }