From: graham.gower@gmail.com Date: Tue, 21 Sep 2010 00:49:26 +0000 (+0000) Subject: Don't call opkg_conf_deinit() if opkg_conf_init() fails. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=578a78948bdeeb11351e22e6dd3edec790f37e19;p=project%2Fopkg-lede.git Don't call opkg_conf_deinit() if opkg_conf_init() fails. Pointed out by Sergey 'Jin' Bostandzhyan . git-svn-id: http://opkg.googlecode.com/svn/trunk@570 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/libopkg/opkg.c b/libopkg/opkg.c index b36dc1b..1efefac 100644 --- a/libopkg/opkg.c +++ b/libopkg/opkg.c @@ -121,20 +121,21 @@ opkg_new() goto err0; if (opkg_conf_load()) - goto err0; + goto err1; if (pkg_hash_load_feeds()) - goto err1; + goto err2; if (pkg_hash_load_status_files()) - goto err1; + goto err2; return 0; -err1: +err2: pkg_hash_deinit(); -err0: +err1: opkg_conf_deinit(); +err0: return -1; }