summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-16 00:45:14 +0000
committerJeremy Allison <jra@samba.org>2003-10-16 00:45:14 +0000
commit21d53cbbaef23bce63ff4deebf9273ac036e7979 (patch)
tree9f60932544317ae35b68099d4522d83006b7a693 /source3/smbd
parent311d739eb761e8a90777e20fd545a00965393eb4 (diff)
downloadsamba-21d53cbbaef23bce63ff4deebf9273ac036e7979.tar.gz
samba-21d53cbbaef23bce63ff4deebf9273ac036e7979.tar.bz2
samba-21d53cbbaef23bce63ff4deebf9273ac036e7979.zip
Ensure error code path doesn't free unmalloced memory. Bug #628.
Jeremy. (This used to be commit ef183bf00f5bad9f9c898067b48ebe052beddc82)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c4
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)));