summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-04-25 22:18:13 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-04-25 22:23:40 +0200
commit47400a2ff767f07b1223f5686ac602e0a8cde64a (patch)
treedf7486e7a7eed58ecadfa1c2e3a1e860f2a36129
parent1da69964917570a206a886ac6a165f5d42754252 (diff)
downloadlibnotify-47400a2ff767f07b1223f5686ac602e0a8cde64a.tar.gz
notify-send: Clear errors that could be re-used
We're using error variable multiple times, and this may lead to problems when trying to set it again. So let's just clear once it's used.
-rw-r--r--tools/notify-send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/notify-send.c b/tools/notify-send.c
index 7fd9efe..65963ff 100644
--- a/tools/notify-send.c
+++ b/tools/notify-send.c
@@ -301,7 +301,7 @@ main (int argc, char *argv[])
if (!retval) {
fprintf (stderr, "%s\n", error->message);
- g_error_free (error);
+ g_clear_error (&error);
hint_error = TRUE;
}
}
@@ -379,7 +379,7 @@ main (int argc, char *argv[])
if (!retval) {
fprintf (stderr, "%s\n", error->message);
- g_error_free (error);
+ g_clear_error (&error);
show_error = TRUE;
}
}