diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 92f37e505ff..73675367127 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4275,7 +4275,7 @@ static WERROR enumprinters_level5(TALLOC_CTX *mem_ctx, WERROR _spoolss_EnumPrinters(pipes_struct *p, struct spoolss_EnumPrinters *r) { - const char *name; + const char *name = NULL; WERROR result; /* that's an [in out] buffer */ @@ -4303,8 +4303,10 @@ WERROR _spoolss_EnumPrinters(pipes_struct *p, * Level 5: same as Level 2 */ - name = talloc_strdup_upper(p->mem_ctx, r->in.server); - W_ERROR_HAVE_NO_MEMORY(name); + if (name) { + name = talloc_strdup_upper(p->mem_ctx, r->in.server); + W_ERROR_HAVE_NO_MEMORY(name); + } switch (r->in.level) { case 0: |