Revert "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 01:24:51 +0000 (01:24 +0000)
committergraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 21 Sep 2010 01:24:51 +0000 (01:24 +0000)
This reverts commit 12e726ce863c221d32d20ba41242c2fcb798a909.

I should pay more attention. This does not fix the problem.

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

libopkg/opkg.c

index 1efefac2cfb232008055903e49ef03e822e7b8e2..b36dc1b0af88779e52e89f8fae8b6351ff72bac0 100644 (file)
@@ -121,21 +121,20 @@ opkg_new()
                goto err0;
 
        if (opkg_conf_load())
-               goto err1;
+               goto err0;
 
        if (pkg_hash_load_feeds())
-               goto err2;
+               goto err1;
 
        if (pkg_hash_load_status_files())
-               goto err2;
+               goto err1;
 
        return 0;
 
-err2:
-       pkg_hash_deinit();
 err1:
-       opkg_conf_deinit();
+       pkg_hash_deinit();
 err0:
+       opkg_conf_deinit();
        return -1;
 }