summaryrefslogtreecommitdiff
path: root/source3/rpc_server/spoolss
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-23 13:11:26 +0100
committerVolker Lendecke <vlendec@samba.org>2011-03-23 13:06:20 +0100
commitcfa8b3663266521c8583168b8f71535c43297481 (patch)
treea3c20ce3b1f4f9829c69956d913025fd95602c91 /source3/rpc_server/spoolss
parente88b9df78bc00985974e68e46f7218d0828ed6f0 (diff)
downloadsamba-cfa8b3663266521c8583168b8f71535c43297481.tar.gz
samba-cfa8b3663266521c8583168b8f71535c43297481.tar.bz2
samba-cfa8b3663266521c8583168b8f71535c43297481.zip
s3: Fix Coverity ID 2201, NULL_RETURNS
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Mar 23 13:06:20 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index c4e5341921..c49d610555 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -789,6 +789,9 @@ static WERROR winreg_printer_write_date(TALLOC_CTX *mem_ctx,
} else {
t = nt_time_to_unix(data);
tm = localtime(&t);
+ if (tm == NULL) {
+ return map_werror_from_unix(errno);
+ }
str = talloc_asprintf(mem_ctx, "%02d/%02d/%04d",
tm->tm_mon + 1, tm->tm_mday, tm->tm_year + 1900);
}