summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/patchfile_dotreg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 3b5708978d..12f2f70774 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -61,10 +61,12 @@ static WERROR reg_dotreg_diff_set_value(void *_data, const char *path,
uint32_t value_type, DATA_BLOB value)
{
struct dotreg_data *data = (struct dotreg_data *)_data;
-
+ char *data_string = reg_val_data_string(NULL, data->iconv_convenience,
+ value_type, value);
+ W_ERROR_HAVE_NO_MEMORY(data_string);
fdprintf(data->fd, "\"%s\"=%s:%s\n",
- value_name, str_regtype(value_type),
- reg_val_data_string(NULL, data->iconv_convenience, value_type, value));
+ value_name, str_regtype(value_type), data_string);
+ talloc_free(data_string);
return WERR_OK;
}