Don't call opkg_conf_deinit() if opkg_conf_init() fails.
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 21 Sep 2010 00:49:26 +0000 (00:49 +0000)
committergraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 21 Sep 2010 00:49:26 +0000 (00:49 +0000)
Pointed out by Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.

git-svn-id: http://opkg.googlecode.com/svn/trunk@570 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg.c

index b36dc1b..1efefac 100644 (file)
@@ -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;
 }