diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-21 14:46:47 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-21 14:46:47 +0200 |
commit | 37ba9e25fb8ed1327a305617040f993ad453b6a9 (patch) | |
tree | bd40b392a290167e47476eab03374a7e9b08aae4 /src/profile.c | |
parent | d878aac68ea38bbfdacb9a61aa371e09b9971cc2 (diff) | |
download | bluez-37ba9e25fb8ed1327a305617040f993ad453b6a9.tar.gz |
core: Don't use GLib allocators for bt_uuid2string and bt_name2string
Diffstat (limited to 'src/profile.c')
-rw-r--r-- | src/profile.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/profile.c b/src/profile.c index 0862a3668..ecbb1c5d5 100644 --- a/src/profile.c +++ b/src/profile.c @@ -2146,7 +2146,7 @@ static int parse_ext_opt(struct ext_profile *ext, const char *key, if (type != DBUS_TYPE_STRING) return -EINVAL; dbus_message_iter_get_basic(value, &str); - g_free(ext->service); + free(ext->service); ext->service = bt_name2string(str); } @@ -2156,27 +2156,27 @@ static int parse_ext_opt(struct ext_profile *ext, const char *key, static void set_service(struct ext_profile *ext) { if (strcasecmp(ext->uuid, HSP_HS_UUID) == 0) { - ext->service = g_strdup(ext->uuid); + ext->service = strdup(ext->uuid); } else if (strcasecmp(ext->uuid, HSP_AG_UUID) == 0) { ext->service = ext->uuid; - ext->uuid = g_strdup(HSP_HS_UUID); + ext->uuid = strdup(HSP_HS_UUID); } else if (strcasecmp(ext->uuid, HFP_HS_UUID) == 0) { - ext->service = g_strdup(ext->uuid); + ext->service = strdup(ext->uuid); } else if (strcasecmp(ext->uuid, HFP_AG_UUID) == 0) { ext->service = ext->uuid; - ext->uuid = g_strdup(HFP_HS_UUID); + ext->uuid = strdup(HFP_HS_UUID); } else if (strcasecmp(ext->uuid, OBEX_SYNC_UUID) == 0 || strcasecmp(ext->uuid, OBEX_OPP_UUID) == 0 || strcasecmp(ext->uuid, OBEX_FTP_UUID) == 0) { - ext->service = g_strdup(ext->uuid); + ext->service = strdup(ext->uuid); } else if (strcasecmp(ext->uuid, OBEX_PSE_UUID) == 0 || strcasecmp(ext->uuid, OBEX_PCE_UUID) == 0) { ext->service = ext->uuid; - ext->uuid = g_strdup(OBEX_PBAP_UUID); + ext->uuid = strdup(OBEX_PBAP_UUID); } else if (strcasecmp(ext->uuid, OBEX_MAS_UUID) == 0 || strcasecmp(ext->uuid, OBEX_MNS_UUID) == 0) { ext->service = ext->uuid; - ext->uuid = g_strdup(OBEX_MAP_UUID); + ext->uuid = strdup(OBEX_MAP_UUID); } } @@ -2275,8 +2275,8 @@ static void remove_ext(struct ext_profile *ext) g_free(ext->remote_uuid); g_free(ext->name); g_free(ext->owner); - g_free(ext->uuid); - g_free(ext->service); + free(ext->uuid); + free(ext->service); g_free(ext->role); g_free(ext->path); g_free(ext->record); @@ -2397,7 +2397,7 @@ bool btd_profile_add_custom_prop(const char *uuid, const char *type, prop = g_new0(struct btd_profile_custom_property, 1); - prop->uuid = g_strdup(uuid); + prop->uuid = strdup(uuid); prop->type = g_strdup(type); prop->name = g_strdup(name); prop->exists = exists; |