aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-02-21 11:15:07 +0100
committerAleksander Morgado <aleksander@lanedo.com>2013-02-21 11:15:37 +0100
commita18140e8ed86e6881d1b5f4bcf33620ff791f35e (patch)
treed847684817df12e7a69e074783392cfbde1ab747
parent0377ccaa59c46dc8536b753cc8b9de17a0f19790 (diff)
plugin: avoid using uninitialized variable
Reported by: Jose Maria Gonzalez <jmgonzalezc@indra.es>
-rw-r--r--src/mm-plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
index 4616e9de..55bee783 100644
--- a/src/mm-plugin.c
+++ b/src/mm-plugin.c
@@ -629,7 +629,7 @@ mm_plugin_supports_port (MMPlugin *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- MMPortProbe *probe;
+ MMPortProbe *probe = NULL;
GSimpleAsyncResult *async_result;
PortProbeRunContext *ctx;
gboolean need_vendor_probing;
@@ -750,7 +750,8 @@ mm_plugin_supports_port (MMPlugin *self,
out:
g_object_unref (async_result);
- g_object_unref (probe);
+ if (probe)
+ g_object_unref (probe);
}
/*****************************************************************************/