summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-20 00:40:25 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-20 00:40:25 +0000
commit173a8dc856d0820fc670b713b3d054647cbd2b4b (patch)
tree0d123566e491743c910501b248ba27c4d820dade /hcid
parentd2ba2cd658a794fc1f81da892bb483123f86fe95 (diff)
Clear newly created structures
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-database.c4
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");