Registry server LDB backend: Don't make copies of the same type
[kai/samba.git] / source4 / lib / registry / ldb.c
index 6c7c448b3d4213a6538a7081419ef7af74855299..87d066e2def006454833a7a85fc55b9da375af45 100644 (file)
@@ -72,7 +72,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
 
        case REG_BINARY:
                if (val != NULL)
-                       *data = data_blob_talloc(mem_ctx, val->data, val->length);
+                       *data = *val;
                else {
                        data->data = NULL;
                        data->length = 0;
@@ -86,7 +86,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
                break;
 
        default:
-               *data = data_blob_talloc(mem_ctx, val->data, val->length);
+               *data = *val;
                break;
        }
 }