diff options
Diffstat (limited to 'libgpo')
-rw-r--r-- | libgpo/gpext/gpext.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c index 865a725c7b..9a09337871 100644 --- a/libgpo/gpext/gpext.c +++ b/libgpo/gpext/gpext.c @@ -281,13 +281,16 @@ static NTSTATUS gp_ext_info_add_reg(TALLOC_CTX *mem_ctx, switch (type) { case REG_SZ: case REG_EXPAND_SZ: - data->v.sz.str = talloc_strdup(mem_ctx, data_s); - NT_STATUS_HAVE_NO_MEMORY(data->v.sz.str); - data->v.sz.len = strlen(data_s); + if (!push_reg_sz(mem_ctx, &data->data, data_s)) { + return NT_STATUS_NO_MEMORY; + } break; - case REG_DWORD: - data->v.dword = atoi(data_s); + case REG_DWORD: { + uint32_t v = atoi(data_s); + data->data = data_blob_talloc(mem_ctx, NULL, 4); + SIVAL(data->data.data, 0, v); break; + } default: return NT_STATUS_NOT_SUPPORTED; } |