summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-21 19:05:22 +0300
committermonsta <[email protected]>2015-09-01 13:10:22 +0300
commit25a7c643d44b7d5c858e2b24b1bd7679777eabb8 (patch)
treecde3a0932176ef395194b8309ff136c900027450
parentf9834be4096a10fcdd8c9f58262d6d2b4e562725 (diff)
downloadmate-utils-25a7c643d44b7d5c858e2b24b1bd7679777eabb8.tar.bz2
mate-utils-25a7c643d44b7d5c858e2b24b1bd7679777eabb8.tar.xz
logview: make sure to always NULL-terminate log lines array
from https://git.gnome.org/browse/gnome-system-log/commit/?id=af6e5f3fd809ec7e477434e8279d1b2f8817f33d
-rw-r--r--logview/logview-log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/logview/logview-log.c b/logview/logview-log.c
index 2f752b02..602f78a7 100644
--- a/logview/logview-log.c
+++ b/logview/logview-log.c
@@ -295,14 +295,14 @@ do_read_new_lines (GIOSchedulerJob *io_job,
g_ptr_array_add (lines, (gpointer) line);
}
+ /* NULL-terminate the array again */
+ g_ptr_array_add (lines, NULL);
+
if (err) {
job->err = err;
goto out;
}
- /* NULL-terminate the array again */
- g_ptr_array_add (lines, NULL);
-
log->priv->has_new_lines = FALSE;
/* we'll return only the new lines in the callback */