qmicli: use g_clear_object() to cleanup cancellable after async operation

This commit is contained in:
Aleksander Morgado 2016-11-25 14:49:12 +01:00
parent 793d5a5da8
commit 0c94e818c5
1 changed files with 2 additions and 4 deletions

View File

@ -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) {