diff options
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 08c3a46133..abe944322e 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1416,11 +1416,15 @@ static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, DEVICEMODE *devmode) return NULL; } - d->dev_private = (uint8 *)TALLOC_MEMDUP(ctx, devmode->dev_private, + if (devmode->driverextra) { + d->dev_private = (uint8 *)TALLOC_MEMDUP(ctx, devmode->dev_private, devmode->driverextra); - if (!d->dev_private) { - return NULL; - } + if (!d->dev_private) { + return NULL; + } + } else { + d->dev_private = NULL; + } return d; } |