diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-29 21:09:23 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-29 21:38:18 +0200 |
commit | 8d0b67b644d636ebab98add81b78093841342cac (patch) | |
tree | d24e3089db47d6741658e9a645abf9058fe4e951 /source4 | |
parent | e25e60ba2f4802a43a0a990c4f34fb23359dab28 (diff) | |
download | samba-8d0b67b644d636ebab98add81b78093841342cac.tar.gz samba-8d0b67b644d636ebab98add81b78093841342cac.tar.bz2 samba-8d0b67b644d636ebab98add81b78093841342cac.zip |
s4:registry/ldb.c - Break with "NULL" as an error case when the data doesn't fit in the "reg_ldb_pack_value" function
Diffstat (limited to 'source4')
-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); |