diff options
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-database.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c index ac7e07d3..f526b60e 100644 --- a/hcid/dbus-database.c +++ b/hcid/dbus-database.c @@ -96,6 +96,8 @@ static DBusHandlerResult add_service_record(DBusConnection *conn, if (!user_record) return DBUS_HANDLER_RESULT_NEED_MEMORY; + memset(user_record, 0, sizeof(*user_record)); + size = len; if (register_sdp_record((uint8_t *) record, size, @@ -139,6 +141,8 @@ static DBusHandlerResult add_service_record_from_xml(DBusConnection *conn, if (!user_record) return DBUS_HANDLER_RESULT_NEED_MEMORY; + memset(user_record, 0, sizeof(*user_record)); + sdp_record = sdp_xml_parse_record(record, strlen(record)); if (!sdp_record) { error("Parsing of XML service record failed"); |