[telepathy-mission-control/master] _mcd_account_migrate_secrets: fix a potential crash when migrating (deja vu...)

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Sep 16 10:29:31 PDT 2009


Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/mcd-account.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mcd-account.c b/src/mcd-account.c
index 132ae92..7e005c5 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -373,7 +373,7 @@ _mcd_account_migrate_secrets (McdAccount *account)
 
     params = mcd_manager_get_parameters (priv->manager, priv->protocol_name);
 
-    for (p = params; p->name != NULL; p++)
+    for (p = params; p != NULL && p->name != NULL; p++)
     {
         if (p->flags & TP_CONN_MGR_PARAM_FLAG_SECRET)
         {
-- 
1.5.6.5



More information about the telepathy-commits mailing list