aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/spawn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r--src/spawn.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index 7b7c10f..f5b7f2f 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -219,6 +219,8 @@ StateExecuteCommand::~StateExecuteCommand()
{
g_main_loop_unref(ctx.mainloop);
g_main_context_unref(ctx.mainctx);
+ if (ctx.error)
+ g_error_free(ctx.error);
}
void
@@ -414,6 +416,10 @@ gerror:
else
expressions.push(FAILURE);
undo.push_var(register_argument) = NULL;
+
+ g_error_free(ctx.error);
+ ctx.error = NULL;
+
return &States::start;
}