aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli/qmicli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmicli/qmicli.c')
-rw-r--r--src/qmicli/qmicli.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qmicli/qmicli.c b/src/qmicli/qmicli.c
index 3fd7e8d..22d5ed7 100644
--- a/src/qmicli/qmicli.c
+++ b/src/qmicli/qmicli.c
@@ -270,10 +270,8 @@ qmicli_async_operation_done (gboolean reported_operation_status)
/* Keep the result of the operation */
operation_status = reported_operation_status;
- if (cancellable) {
- g_object_unref (cancellable);
- cancellable = NULL;
- }
+ /* Cleanup cancellation */
+ g_clear_object (&cancellable);
/* If no client was allocated (e.g. generic action), just quit */
if (!client) {