changeset 753:71833fa5e35f

allow applications to create empty AVP also
author Sebastien Decugis <sdecugis@nict.go.jp>
date Sat, 24 Sep 2011 13:00:30 +0200
parents 9e9840ccf059
children e02254d7d01b
files libfdproto/messages.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libfdproto/messages.c	Sat Sep 24 09:45:14 2011 +0200
+++ b/libfdproto/messages.c	Sat Sep 24 13:00:30 2011 +0200
@@ -1219,12 +1219,8 @@
 	
 	/* Duplicate an octetstring if needed. */
 	if (type == AVP_TYPE_OCTETSTRING) {
-		if (value->os.len) {
-			CHECK_MALLOC(  avp->avp_storage.os.data = os0dup(value->os.data, value->os.len)  );
-			avp->avp_mustfreeos = 1;
-		} else {
-			avp->avp_storage.os.data = NULL;
-		}
+		CHECK_MALLOC(  avp->avp_storage.os.data = os0dup(value->os.data, value->os.len)  );
+		avp->avp_mustfreeos = 1;
 	}
 	
 	/* Set the data pointer of the public part */
"Welcome to our mercurial repository"