From 0817a76ac04c7d31a72f784f02f642ca10e190fb Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 21 Nov 2008 16:05:50 -0300 Subject: [PATCH] obexd: Fixes a segfault when trying to destroy the pbap context --- obexd/src/obex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/src/obex.c b/obexd/src/obex.c index 0dd84fc0b..0bedbe3c1 100644 --- a/obexd/src/obex.c +++ b/obexd/src/obex.c @@ -135,7 +135,7 @@ static void obex_session_free(struct obex_session *os) if (os->current_folder) g_free(os->current_folder); - if (!memcmp(os->target, PBAP_TARGET, TARGET_SIZE)) + if (os->target && !memcmp(os->target, PBAP_TARGET, TARGET_SIZE)) pbap_phonebook_context_destroy(os); g_free(os); -- 2.47.3