aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-12-15 08:16:47 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-12-15 08:16:47 +0100
commit032ba5022655d1e66ddad3f568187bc46af66bd6 (patch)
tree69ca4b2f5bcab6b161f73abd045e8740f1f39506 /src/main.cpp
parent1aab71ce61ea84cb15ed9a83ac4b2c5d22e92501 (diff)
downloadsciteco-032ba5022655d1e66ddad3f568187bc46af66bd6.tar.gz
always free glib's GError structures
* when throwing GlibError(), this is taken care of automatically. * fixes a memleak since there may be resources associated with the GError.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 40b36cb..067e1b2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -161,6 +161,7 @@ process_options(int &argc, char **&argv)
if (!g_option_context_parse(options, &argc, &argv, &gerror)) {
g_fprintf(stderr, "Option parsing failed: %s\n",
gerror->message);
+ g_error_free(gerror);
exit(EXIT_FAILURE);
}