summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-04-09 21:42:35 +0200
committerDmitry Kozlov <xeb@mail.ru>2013-04-17 09:06:34 +0400
commitfaf185d337229fd521bfbadbb8c8ad3a34e5b705 (patch)
treebdb50a9b316316eb92a2a51e2cbafd1b9317c3c5
parent4bbba963b5f02284908df147e3d9f702eb5fe967 (diff)
downloadaccel-ppp-faf185d337229fd521bfbadbb8c8ad3a34e5b705.tar.gz
accel-ppp-faf185d337229fd521bfbadbb8c8ad3a34e5b705.zip
l2tp: Fix double string AVP copy
When adding a string AVP to an L2TP packet, the attribute value is allocated and set using strdup(). There's no need to memcpy() it again afterwards. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r--accel-pppd/ctrl/l2tp/packet.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c
index 87735a2a..03816d50 100644
--- a/accel-pppd/ctrl/l2tp/packet.c
+++ b/accel-pppd/ctrl/l2tp/packet.c
@@ -469,7 +469,6 @@ int l2tp_packet_add_string(struct l2tp_packet_t *pack, int id, const char *val,
mempool_free(attr);
return -1;
}
- memcpy(attr->val.string, val, attr->length);
list_add_tail(&attr->entry, &pack->attrs);
return 0;