summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/msm_execute_helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/msm_execute_helper.c b/tools/msm_execute_helper.c
index eff687a..5d568b4 100644
--- a/tools/msm_execute_helper.c
+++ b/tools/msm_execute_helper.c
@@ -8,10 +8,12 @@ int main(int argc, char* argv[])
gchar **argv_modified = g_new0 (gchar *, argc + 1);
memcpy (argv_modified, argv, argc * sizeof (char*));
argv_modified[0] = COMMAND;
+ int errsv = 0;
if (execvp (COMMAND, argv_modified) == -1) {
- return errno;
+ errsv = errno;
}
- return 0;
+ g_free (argv_modified);
+ return errsv;
}