diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-06 12:50:33 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-06 12:58:39 -0800 |
commit | cfab569484b18407fc117bb96634525cc76ea1f5 (patch) | |
tree | 754ec37148cc95958f1657e25768ad69565ebf23 /obexd | |
parent | 9f09e69ecb077082301dafb745856e1f3731aaa7 (diff) | |
download | bluez-cfab569484b18407fc117bb96634525cc76ea1f5.tar.gz |
build: Replace use of g_memdup with util_memdup
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:
warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
Diffstat (limited to 'obexd')
-rw-r--r-- | obexd/src/obex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/obexd/src/obex.c b/obexd/src/obex.c index 9f992ec18..3a68fd66c 100644 --- a/obexd/src/obex.c +++ b/obexd/src/obex.c @@ -40,6 +40,7 @@ #include "mimetype.h" #include "service.h" #include "transport.h" +#include "src/shared/util.h" typedef struct { uint8_t version; @@ -145,7 +146,7 @@ static void os_reset_session(struct obex_session *os) os->path = NULL; } if (os->apparam) { - g_free(os->apparam); + free(os->apparam); os->apparam = NULL; os->apparam_len = 0; } @@ -594,7 +595,7 @@ static void parse_apparam(struct obex_session *os, GObexPacket *req) if (!g_obex_header_get_bytes(hdr, &apparam, &len)) return; - os->apparam = g_memdup(apparam, len); + os->apparam = util_memdup(apparam, len); os->apparam_len = len; DBG("APPARAM"); } |