From 09959bf44d59941446f11980dcaf3aa1061edc13 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 15 Dec 2008 04:09:20 +0100 Subject: [PATCH] Fix error handling of init routine --- plugins/dnsproxy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/dnsproxy.c b/plugins/dnsproxy.c index bc61d51..39eefec 100644 --- a/plugins/dnsproxy.c +++ b/plugins/dnsproxy.c @@ -368,12 +368,10 @@ static int dnsproxy_init(void) return err; err = connman_resolver_register(&dnsproxy_resolver); - if (err < 0) { + if (err < 0) destroy_listener(); - return err; - } - return 0; + return err; } static void dnsproxy_exit(void) -- 2.7.4