diff options
Diffstat (limited to 'source4/lib/registry/ldb.c')
-rw-r--r-- | source4/lib/registry/ldb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 80fbb85ac7..2310babd8d 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -186,7 +186,8 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, ret = ldb_msg_add_string(msg, "data", conv_str); } else { /* workaround for non-standard data */ - ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); + talloc_free(msg); + return NULL; } } else { ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); @@ -207,7 +208,9 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, ret = ldb_msg_add_string(msg, "data", conv_str); } else { /* workaround for non-standard data */ - ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); + talloc_free(msg); + return NULL; + } } else { ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); |