diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-26 11:26:24 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-26 11:26:24 +0000 |
commit | f3695d5fc4559135a5c97ffbcb38961fbc1bb0d1 (patch) | |
tree | 1bfbe77993df56247abd17b626437883ae3b135c /hcid/parser.y | |
parent | 21a038269e8e2264b149e50355e6e18ccba1d334 (diff) |
Also update parser to use glib memory allocation
Diffstat (limited to 'hcid/parser.y')
-rw-r--r-- | hcid/parser.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hcid/parser.y b/hcid/parser.y index 0f218272..aa16a5c7 100644 --- a/hcid/parser.y +++ b/hcid/parser.y @@ -37,6 +37,8 @@ #include <sys/socket.h> #include <asm/types.h> +#include <glib.h> + #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> @@ -191,9 +193,9 @@ device_opt: | K_NAME dev_name { if (parser_device->name) - free(parser_device->name); + g_free(parser_device->name); parser_device->flags |= (1 << HCID_SET_NAME); - parser_device->name = strdup($2); + parser_device->name = g_strdup($2); } | K_CLASS NUM { |