Fix problems in error list
[oweals/opkg-lede.git] / libopkg / libopkg.c
index 552ee20eb3400e6d2be54bf1e5eecd61a43bf9e2..418a32485624c7f88de27bb6a1dedf241cf6e47b 100644 (file)
@@ -128,14 +128,13 @@ opkg_op (int argc, char *argv[])
 
 
        err = opkg_conf_init (&opkg_conf, &args);
 
 
        err = opkg_conf_init (&opkg_conf, &args);
+       args_deinit (&args);
        if (err)
        {
                opkg_print_error_list (&opkg_conf);
                return err;
        }
 
        if (err)
        {
                opkg_print_error_list (&opkg_conf);
                return err;
        }
 
-       args_deinit (&args);
-
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else