summaryrefslogtreecommitdiff
authorAleksander Morgado <aleksander@lanedo.com>2012-11-07 09:01:03 (GMT)
committer Aleksander Morgado <aleksander@lanedo.com>2012-11-07 10:10:32 (GMT)
commit94d62146e39c3c48fcd4e134cad99f6aadb0d77d (patch) (side-by-side diff)
tree2893ec779ec3ac0f05e81e3e4a66b34582c128b2
parent11db2ea38093bc8d1bb1424cfca84abf3b66185c (diff)
downloadModemManager-94d62146e39c3c48fcd4e134cad99f6aadb0d77d.zip
ModemManager-94d62146e39c3c48fcd4e134cad99f6aadb0d77d.tar.gz
libmm-glib,manager: avoid unref of unset cancellables
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libmm-glib/mm-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmm-glib/mm-manager.c b/libmm-glib/mm-manager.c
index 7dc914f..37f3ac4 100644
--- a/libmm-glib/mm-manager.c
+++ b/libmm-glib/mm-manager.c
@@ -486,7 +486,8 @@ init_async_context_free (InitAsyncContext *ctx)
{
g_object_unref (ctx->manager);
g_object_unref (ctx->result);
- g_object_unref (ctx->cancellable);
+ if (ctx->cancellable)
+ g_object_unref (ctx->cancellable);
g_free (ctx);
}