Clone original flags too. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/datatype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatype.c b/src/datatype.c index 74df89c3219f..d57e9a581df9 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -1103,7 +1103,7 @@ static struct datatype *dtype_clone(const struct datatype *orig_dtype) *dtype = *orig_dtype; dtype->name = xstrdup(orig_dtype->name); dtype->desc = xstrdup(orig_dtype->desc); - dtype->flags = DTYPE_F_ALLOC; + dtype->flags = DTYPE_F_ALLOC | orig_dtype->flags; dtype->refcnt = 1; return dtype; -- 2.11.0