]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Get pointer to existing extension
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 6 Dec 2020 04:20:44 +0000 (21:20 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 6 Dec 2020 04:20:44 +0000 (21:20 -0700)
src/lib/util/ext.c

index a8d03f499076f33870b749475237ac207dde1baf..ed60a1f033e360535a6c64be57ecf2731735527b 100644 (file)
@@ -194,6 +194,8 @@ void *fr_ext_copy(fr_ext_t const *def, TALLOC_CTX **chunk_dst, TALLOC_CTX const
                        ext_dst_ptr = fr_ext_alloc_size(def, chunk_dst, ext,
                                                        fr_ext_len(def, chunk_src, ext));
                }
+       } else {
+               ext_dst_ptr = fr_ext_ptr(*chunk_dst, ext_dst_offsets[ext], info->has_hdr);
        }
 
        if (info->copy) {