From 36ca1992d4b95a8fe0490eedc91f2bac5e117e0c Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 10 Feb 2012 18:40:02 -0300 Subject: [PATCH] mgmtops: Fix doing a useless memset() The buffers were already allocated using g_try_malloc0(). --- plugins/mgmtops.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index 7e4738687..d354bc695 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -1958,8 +1958,6 @@ static int mgmt_load_link_keys(int index, GSList *keys, gboolean debug_keys) if (buf == NULL) return -ENOMEM; - memset(buf, 0, sizeof(buf)); - hdr = (void *) buf; hdr->opcode = htobs(MGMT_OP_LOAD_LINK_KEYS); hdr->len = htobs(cp_size); @@ -2169,8 +2167,6 @@ static int mgmtops_load_ltks(int index, GSList *keys) if (buf == NULL) return -ENOMEM; - memset(buf, 0, sizeof(buf)); - hdr = (void *) buf; hdr->opcode = htobs(MGMT_OP_LOAD_LONG_TERM_KEYS); hdr->len = htobs(cp_size); -- 2.47.3