From c173e6e80db7505ccc71d95ed602804133d602d7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 20 Jun 2011 19:27:01 +0200 Subject: s3-spoolss: Fix some valgrind warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are in/out values and need to be initialized. Signed-off-by: Günther Deschner Autobuild-User: Günther Deschner Autobuild-Date: Tue Jun 21 18:58:30 CEST 2011 on sn-devel-104 --- source3/rpc_server/spoolss/srv_spoolss_nt.c | 6 +++--- source3/rpc_server/spoolss/srv_spoolss_util.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index cb311ef043..8216388905 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -9191,9 +9191,9 @@ WERROR _spoolss_GetPrinterDataEx(struct pipes_struct *p, int snum = 0; WERROR result = WERR_OK; DATA_BLOB blob; - enum winreg_Type val_type; - uint8_t *val_data; - uint32_t val_size; + enum winreg_Type val_type = REG_NONE; + uint8_t *val_data = NULL; + uint32_t val_size = 0; DEBUG(4,("_spoolss_GetPrinterDataEx\n")); diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c index ecb3567060..5201571a37 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.c +++ b/source3/rpc_server/spoolss/srv_spoolss_util.c @@ -471,7 +471,7 @@ static WERROR winreg_printer_enumvalues(TALLOC_CTX *mem_ctx, data_size = max_valbufsize; data = NULL; if (data_size) { - data = (uint8_t *) TALLOC(tmp_ctx, data_size); + data = (uint8_t *) talloc_zero_size(tmp_ctx, data_size); } length = 0; @@ -2315,9 +2315,9 @@ WERROR winreg_get_printer_dataex(TALLOC_CTX *mem_ctx, struct dcerpc_binding_handle *winreg_handle = NULL; struct policy_handle hive_hnd, key_hnd; struct winreg_String wvalue; - enum winreg_Type type_in; + enum winreg_Type type_in = REG_NONE; char *path; - uint8_t *data_in; + uint8_t *data_in = NULL; uint32_t data_in_size = 0; uint32_t value_len = 0; WERROR result = WERR_OK; @@ -3337,8 +3337,8 @@ WERROR winreg_printer_getform1(TALLOC_CTX *mem_ctx, struct dcerpc_binding_handle *winreg_handle = NULL; struct policy_handle hive_hnd, key_hnd; struct winreg_String wvalue; - enum winreg_Type type_in; - uint8_t *data_in; + enum winreg_Type type_in = REG_NONE; + uint8_t *data_in = NULL; uint32_t data_in_size = 0; uint32_t value_len = 0; uint32_t num_builtin = ARRAY_SIZE(builtin_forms1); -- cgit