From 472095161ee67cbecd930534a99abda31d18d1b4 Mon Sep 17 00:00:00 2001 From: Syam Sidhardhan Date: Sun, 18 Sep 2011 14:59:15 +0530 Subject: [PATCH] Fix crash when update service record with an invalid XML If we pass an invalid xml to sdp_xml_parse_record(), then it returns NULL. Further we are passing the this NULL pointer to the sdp_record_free(), which leads to invalid memory access. --- plugins/service.c | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/service.c b/plugins/service.c index d73cdeab2..14a5cb637 100644 --- a/plugins/service.c +++ b/plugins/service.c @@ -436,7 +436,6 @@ static DBusMessage *update_xml_record(DBusConnection *conn, sdp_record = sdp_xml_parse_record(record, len); if (!sdp_record) { error("Parsing of XML service record failed"); - sdp_record_free(sdp_record); return btd_error_failed(msg, "Parsing of XML service record failed"); } -- 2.47.3