diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-06-17 09:40:56 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-06-17 09:40:56 +0300 |
commit | b336e93a471f4ede121edaf822cd525c2ffc17a7 (patch) | |
tree | add08bc5de6d60b445229e9906750a1c9298637d /audio | |
parent | ed3773ab5d7825a84bd12f43be7e082edaaf6201 (diff) | |
download | bluez-b336e93a471f4ede121edaf822cd525c2ffc17a7.tar.gz |
Fix memory leak
Diffstat (limited to 'audio')
-rw-r--r-- | audio/manager.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/audio/manager.c b/audio/manager.c index f6a98cd06..5edfb1807 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -351,12 +351,18 @@ static sdp_record_t *hfp_ag_record(uint8_t ch, uint32_t feat) sdp_data_t *channel, *features; uint8_t netid = 0x01; uint16_t sdpfeat; - sdp_data_t *network = sdp_data_alloc(SDP_UINT8, &netid); + sdp_data_t *network; record = sdp_record_alloc(); if (!record) return NULL; + network = sdp_data_alloc(SDP_UINT8, &netid); + if (!network) { + sdp_record_free(record); + return NULL; + } + sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP); root = sdp_list_append(0, &root_uuid); sdp_set_browse_groups(record, root); |