diff options
author | Rakesh M K <rakesh.mk@samsung.com> | 2014-11-26 16:32:44 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-11-26 15:39:00 +0200 |
commit | 0a1d0e8968d4c41aecf8f50956fb19dd725c3c78 (patch) | |
tree | 18e8c2ebf4afd946701c0679457692aab50b41e9 /obexd/client | |
parent | 0e1473d188baa57226f08fbab1795e47da7a6768 (diff) | |
download | bluez-0a1d0e8968d4c41aecf8f50956fb19dd725c3c78.tar.gz |
obexd: Fix crash while session shutdown
g_str_equal has been used for the session path compare
which is not NULL-safe. Used the g_strcmp0() for the NULL-Safe
string comparision.
*#0 strcmp (p1=0x0, p2=0x7105c "/org/bluez/obex/client/session0")
* at strcmp.c:38
*#1 0xb6e0cd0a in g_str_equal (v1=<value optimized out>,
* v2=<value optimized out>) at ghash.c:1704
*#2 0x000264d8 in find_session (connection=<value optimized out>,
* message=0x55b38, user_data=<value optimized out>)
* at obexd/client/manager.c:162
*#3 remove_session (connection=<value optimized out>, message=0x55b38,
user_data=<value optimized out>) at obexd/client/manager.c:231
Diffstat (limited to 'obexd/client')
-rw-r--r-- | obexd/client/manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/obexd/client/manager.c b/obexd/client/manager.c index 8efe1f259..7ae111ca7 100644 --- a/obexd/client/manager.c +++ b/obexd/client/manager.c @@ -157,7 +157,7 @@ static struct obc_session *find_session(const char *path) for (l = sessions; l; l = l->next) { struct obc_session *session = l->data; - if (g_str_equal(obc_session_get_path(session), path) == TRUE) + if (g_strcmp0(obc_session_get_path(session), path) == 0) return session; } |