Commit 0e3c60e6 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

allow applications to create empty AVP also

parent a40d656d
...@@ -1219,12 +1219,8 @@ int fd_msg_avp_setvalue ( struct avp *avp, union avp_value *value ) ...@@ -1219,12 +1219,8 @@ int fd_msg_avp_setvalue ( struct avp *avp, union avp_value *value )
/* Duplicate an octetstring if needed. */ /* Duplicate an octetstring if needed. */
if (type == AVP_TYPE_OCTETSTRING) { if (type == AVP_TYPE_OCTETSTRING) {
if (value->os.len) { CHECK_MALLOC( avp->avp_storage.os.data = os0dup(value->os.data, value->os.len) );
CHECK_MALLOC( avp->avp_storage.os.data = os0dup(value->os.data, value->os.len) ); avp->avp_mustfreeos = 1;
avp->avp_mustfreeos = 1;
} else {
avp->avp_storage.os.data = NULL;
}
} }
/* Set the data pointer of the public part */ /* Set the data pointer of the public part */
......
Markdown is supported
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