aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-11-25 14:49:12 +0100
committerAleksander Morgado <aleksander@aleksander.es>2016-11-25 14:49:12 +0100
commit0c94e818c54f4c6fc5be49e86dc84d2f15722e9e (patch)
tree61b4a686066fca45ef78ad3779802a6c3cd3d599 /src/qmicli
parent793d5a5da86062837638d13499455a1ccb68f85b (diff)
downloadexternal_libqmi-0c94e818c54f4c6fc5be49e86dc84d2f15722e9e.zip
external_libqmi-0c94e818c54f4c6fc5be49e86dc84d2f15722e9e.tar.gz
external_libqmi-0c94e818c54f4c6fc5be49e86dc84d2f15722e9e.tar.bz2
qmicli: use g_clear_object() to cleanup cancellable after async operation
Diffstat (limited to 'src/qmicli')
-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) {