From 43f45e81fb60164bd7661bc75b524a8ec9e6321a Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 23 Feb 2014 22:20:43 +0100 Subject: [PATCH] conf: Do not leak memory when modules::module is already loaded. --- src/newconf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index da3f8672..bc0e3d49 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -290,10 +290,8 @@ conf_set_modules_module(void *data) m_bn = rb_basename((char *) data); - if(findmodule_byname(m_bn) != -1) - return; - - load_one_module((char *) data, 0); + if(findmodule_byname(m_bn) == -1) + load_one_module((char *) data, 0); rb_free(m_bn); #else