Skip to content
Snippets Groups Projects
Commit 77f12f25 authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Fixed dname table copying.

- Was not increasing reference count.

refs #993
parent 44319b76
Branches
Tags
No related merge requests found
......@@ -81,6 +81,7 @@ static int dnslib_dname_table_copy_node(const struct dname_table_node *from,
}
(*to)->dname = from->dname;
dnslib_dname_retain((*to)->dname);
(*to)->avl.avl_height = from->avl.avl_height;
int ret = dnslib_dname_table_copy_node(from->avl.avl_left,
......
......@@ -134,7 +134,7 @@ int dnslib_dname_from_wire(const uint8_t *name, unsigned int size,
struct dnslib_node *node, dnslib_dname_t *target);
/*!
* \brief Copies the given domain name.
* \brief Duplicates the given domain name.
*
* \note Copied dname referense count is reset to 1, caller is responsible
* for releasing it after use.
......@@ -142,8 +142,6 @@ int dnslib_dname_from_wire(const uint8_t *name, unsigned int size,
* \param dname Domain name to be copied.
*
* \return New domain name which is an exact copy of \a dname.
*
* \todo Deep/shallow copying.
*/
dnslib_dname_t *dnslib_dname_copy(const dnslib_dname_t *dname);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment