From 275d067123f9a795c524e4126394918e08c14dbd Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 16 Jan 2015 11:23:06 +0200 Subject: [PATCH] wiphy: Use l_memdup instead of l_malloc and memcpy Converting l_malloc() and memcpy() function pairs to use new l_memdup() function. --- src/wiphy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wiphy.c b/src/wiphy.c index 352d5f9f..22852648 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -578,8 +578,7 @@ static bool parse_ie(struct bss *bss, const void *data, uint16_t len) } bss->ssid_len = iter.len; - bss->ssid = l_malloc(bss->ssid_len); - memcpy(bss->ssid, iter.data, iter.len); + bss->ssid = l_memdup(iter.data, iter.len); break; default: break;