summaryrefslogtreecommitdiffstats
path: root/src/wgtpkg-install.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wgtpkg-install.c')
-rw-r--r--src/wgtpkg-install.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 933e612..70198e9 100644
--- a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -28,6 +28,7 @@
#include "wgtpkg.h"
#include "wgt.h"
#include "wgt-info.h"
+#include "wgtpkg-install.h"
#include "secmgr-wrap.h"
#include "utils-dir.h"
@@ -216,7 +217,7 @@ error:
}
/* install the widget of the file */
-int install_widget(const char *wgtfile, const char *root, int force)
+struct wgt_info *install_widget(const char *wgtfile, const char *root, int force)
{
struct wgt_info *ifo;
const struct wgt_desc *desc;
@@ -253,7 +254,8 @@ int install_widget(const char *wgtfile, const char *root, int force)
if (install_security(desc))
goto error3;
- return 0;
+ file_reset();
+ return ifo;
error3:
wgt_info_unref(ifo);
@@ -262,6 +264,7 @@ error2:
remove_workdir();
error1:
- return -1;
+ file_reset();
+ return NULL;
}