summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-06-01 21:52:49 +0000
committerJeremy Allison <jra@samba.org>2000-06-01 21:52:49 +0000
commit8ff6458a3e568e759969fd1a9c827c4b47008cfb (patch)
tree8f61d6a1f60ad1a407fed09c4e543b7aefb73741 /source3/printing
parentb9fedcb2de5612bdb4e763fe0788e1a4a9c16d33 (diff)
downloadsamba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.tar.gz
samba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.tar.bz2
samba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.zip
More insure found memory leak and corruption fixes.
Jeremy. (This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index de3b9ed6c5..82facbe453 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1276,18 +1276,35 @@ uint32 get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
{
uint32 success;
- NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3;
switch (level)
{
case 3:
{
+ NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3;
if (driver.info_3 != NULL)
{
info3=driver.info_3;
safe_free(info3->dependentfiles);
- safe_free(info3);
ZERO_STRUCTP(info3);
+ safe_free(info3);
+ success=0;
+ }
+ else
+ {
+ success=4;
+ }
+ break;
+ }
+ case 6:
+ {
+ NT_PRINTER_DRIVER_INFO_LEVEL_3 *info6;
+ if (driver.info_6 != NULL)
+ {
+ info6=driver.info_6;
+ safe_free(info6->dependentfiles);
+ ZERO_STRUCTP(info6);
+ safe_free(info6);
success=0;
}
else