diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-01-03 19:59:10 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:44 +0100 |
commit | 7b884c46351bde98a371007b37e2ae13c8284ca6 (patch) | |
tree | 8e023026ea8a9a77e50b501f921068333a7982fe /src | |
parent | 1304b659569db42c6b69b8a1f20041a6cb6a4012 (diff) |
base-modem-at: always unref the modem object in AT command/sequence contexts
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-base-modem-at.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mm-base-modem-at.c b/src/mm-base-modem-at.c index a7b94ef2..4ecb64de 100644 --- a/src/mm-base-modem-at.c +++ b/src/mm-base-modem-at.c @@ -78,12 +78,11 @@ at_sequence_context_free (AtSequenceContext *ctx) { mm_serial_port_close (MM_SERIAL_PORT (ctx->port)); g_object_unref (ctx->port); + g_object_unref (ctx->self); if (ctx->response_processor_context && ctx->response_processor_context_free) ctx->response_processor_context_free (ctx->response_processor_context); - if (ctx->self) - g_object_unref (ctx->self); if (ctx->cancellable) g_object_unref (ctx->cancellable); if (ctx->result) @@ -361,13 +360,12 @@ typedef struct { static void at_command_context_free (AtCommandContext *ctx) { - if (ctx->self) - g_object_unref (ctx->self); if (ctx->cancellable) g_object_unref (ctx->cancellable); mm_serial_port_close (MM_SERIAL_PORT (ctx->port)); g_object_unref (ctx->port); g_object_unref (ctx->result); + g_object_unref (ctx->self); g_free (ctx); } |