diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 00:40:25 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 00:40:25 +0000 |
commit | 173a8dc856d0820fc670b713b3d054647cbd2b4b (patch) | |
tree | 0d123566e491743c910501b248ba27c4d820dade /hcid | |
parent | d2ba2cd658a794fc1f81da892bb483123f86fe95 (diff) |
Clear newly created structures
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"); |