r9766: Prevent erroneous OOM message
[sfrench/samba-autobuild/.git] / source4 / lib / ldb / common / attrib_handlers.c
index da2d9454190ca997d156f37194f7932abf2ee288..412146360cc3dd388a08f4d0fc1a6dab49905e29 100644 (file)
@@ -38,7 +38,7 @@ int ldb_handler_copy(struct ldb_context *ldb, void *mem_ctx,
                     const struct ldb_val *in, struct ldb_val *out)
 {
        *out = ldb_val_dup(mem_ctx, in);
-       if (out->data == NULL) {
+       if (in->length > 0 && out->data == NULL) {
                ldb_oom(ldb);
                return -1;
        }