summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-06-20 19:27:01 +0200
committerGünther Deschner <gd@samba.org>2011-06-21 18:58:29 +0200
commitc173e6e80db7505ccc71d95ed602804133d602d7 (patch)
treeca3768bb76642a7d8839a14e3b599eae6e5ce3d5 /source3/rpc_server
parenta45120aea75044fb58dd6ce267d852be9d2978af (diff)
downloadsamba-c173e6e80db7505ccc71d95ed602804133d602d7.tar.gz
samba-c173e6e80db7505ccc71d95ed602804133d602d7.tar.bz2
samba-c173e6e80db7505ccc71d95ed602804133d602d7.zip
s3-spoolss: Fix some valgrind warnings.
These are in/out values and need to be initialized. Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Jun 21 18:58:30 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c6
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.c10
2 files changed, 8 insertions, 8 deletions
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);