diff options
author | Jeremy Allison <jra@samba.org> | 2003-10-16 00:45:17 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-10-16 00:45:17 +0000 |
commit | c19e1d51e041e298cb7241cde4c635a003a66391 (patch) | |
tree | 511f1c4a2accfe5283b61361f4f3a9f9686ac1df /source3 | |
parent | 64e21a4eb106f32c1687a975fa5d8178d58bcda2 (diff) | |
download | samba-c19e1d51e041e298cb7241cde4c635a003a66391.tar.gz samba-c19e1d51e041e298cb7241cde4c635a003a66391.tar.bz2 samba-c19e1d51e041e298cb7241cde4c635a003a66391.zip |
Ensure error code path doesn't free unmalloced memory. Bug #628.
Jeremy.
(This used to be commit d817716519e1b2a619a46563ca44812a020a769a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/lanman.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index b27ccc23ef..30934d0b3a 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -522,6 +522,8 @@ static void fill_printq_info_52(connection_struct *conn, int snum, NT_PRINTER_DRIVER_INFO_LEVEL driver; NT_PRINTER_INFO_LEVEL *printer = NULL; + ZERO_STRUCT(driver); + if ( !W_ERROR_IS_OK(get_a_printer( NULL, &printer, 2, lp_servicename(snum))) ) { DEBUG(3,("fill_printq_info_52: Failed to lookup printer [%s]\n", lp_servicename(snum))); @@ -679,6 +681,8 @@ static int get_printerdrivernumber(int snum) NT_PRINTER_DRIVER_INFO_LEVEL driver; NT_PRINTER_INFO_LEVEL *printer = NULL; + ZERO_STRUCT(driver); + if ( !W_ERROR_IS_OK(get_a_printer( NULL, &printer, 2, lp_servicename(snum))) ) { DEBUG(3,("get_printerdrivernumber: Failed to lookup printer [%s]\n", lp_servicename(snum))); |