Make a _copy_ of the attributes when copying them.
[radsecproxy.git] / radmsg.c
index e422f90..6e33990 100644 (file)
--- a/radmsg.c
+++ b/radmsg.c
@@ -118,7 +118,7 @@ int radmsg_copy_attrs(struct radmsg *dst,
     int n = 0;
 
     for (node = list_first(list); node; node = list_next(node)) {
-        if (radmsg_add(dst, (struct tlv *) node->data) != 1) {
+        if (radmsg_add(dst, copytlv((struct tlv *) node->data)) != 1) {
             n = -n;
             break;
         }