telepathy-gabble: conn-contact-info: prevent a potential NULL dereferencing
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Tue Jun 3 04:39:18 PDT 2014
Module: telepathy-gabble
Branch: master
Commit: 5c0256475ee32eb8207bacbaac5ce58ae7dc7483
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=5c0256475ee32eb8207bacbaac5ce58ae7dc7483
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Mon Jun 2 16:29:30 2014 +0200
conn-contact-info: prevent a potential NULL dereferencing
---
src/conn-contact-info.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conn-contact-info.c b/src/conn-contact-info.c
index 599197b..fd5c4a7 100644
--- a/src/conn-contact-info.c
+++ b/src/conn-contact-info.c
@@ -483,8 +483,10 @@ _return_from_request_contact_info (WockyNode *vcard_node,
if (NULL == vcard_node)
{
- GError tp_error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- vcard_error->message };
+ GError tp_error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "" };
+
+ g_assert (vcard_error != NULL);
+ tp_error.message = vcard_error->message;
if (vcard_error->domain == WOCKY_XMPP_ERROR)
{
More information about the telepathy-commits
mailing list