summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-26 21:03:20 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-26 21:03:20 +0100
commit20838c935a9ecb2c94ab628439f4bf13ea8e3053 (patch)
tree55ae643eec2a7f75986b093627254e1baaf465f2 /src
parent53712434c0f7b6d34523540ad766aa27c2cc9501 (diff)
unload modules last (fixes #186)
Diffstat (limited to 'src')
-rw-r--r--src/conf.c1
-rw-r--r--src/main.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index 6be861e..9234b00 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -382,6 +382,5 @@ struct conf *conf_cur(void)
void conf_close(void)
{
- mod_close();
conf_obj = mem_deref(conf_obj);
}
diff --git a/src/main.c b/src/main.c
index 0028465..2fe552a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -249,6 +249,12 @@ int main(int argc, char *argv[])
baresip_close();
+ /* NOTE: modules must be unloaded after all application
+ * activity has stopped.
+ */
+ debug("main: unloading modules..\n");
+ mod_close();
+
libre_close();
/* Check for memory leaks */