summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-12-21 23:23:34 +0000
committerGerald Carter <jerry@samba.org>2000-12-21 23:23:34 +0000
commit21f0dc985ae2d6c3ef85bcca34f07d216f51b692 (patch)
treed5e40f7ef15c287dca1d30d2c612be6eb1239b4d
parent7b82fa6f71cd9650d84b7c36903ec6068cbe4ff4 (diff)
downloadsamba-21f0dc985ae2d6c3ef85bcca34f07d216f51b692.tar.gz
samba-21f0dc985ae2d6c3ef85bcca34f07d216f51b692.tar.bz2
samba-21f0dc985ae2d6c3ef85bcca34f07d216f51b692.zip
merge from appliance head
(This used to be commit 4671a313775f052ae949ba441db7e0060bed0b75)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 38a4b26a60..cd67a3b88a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -779,13 +779,16 @@ static BOOL convert_devicemode(const DEVICEMODE *devmode, NT_DEVICEMODE *nt_devm
nt_devmode->panningwidth=devmode->panningwidth;
nt_devmode->panningheight=devmode->panningheight;
+ safe_free(nt_devmode->private);
if (nt_devmode->driverextra != 0) {
/* if we had a previous private delete it and make a new one */
- safe_free(nt_devmode->private);
if((nt_devmode->private=(uint8 *)malloc(nt_devmode->driverextra * sizeof(uint8))) == NULL)
return False;
memcpy(nt_devmode->private, devmode->private, nt_devmode->driverextra);
}
+ else {
+ nt_devmode->private = NULL;
+ }
return True;
}