1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

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
This commit is contained in:
Volker Lendecke 2011-03-23 13:11:26 +01:00 committed by Volker Lendecke
parent e88b9df78b
commit cfa8b36632

View File

@ -789,6 +789,9 @@ static WERROR winreg_printer_write_date(TALLOC_CTX *mem_ctx,
} else { } else {
t = nt_time_to_unix(data); t = nt_time_to_unix(data);
tm = localtime(&t); tm = localtime(&t);
if (tm == NULL) {
return map_werror_from_unix(errno);
}
str = talloc_asprintf(mem_ctx, "%02d/%02d/%04d", str = talloc_asprintf(mem_ctx, "%02d/%02d/%04d",
tm->tm_mon + 1, tm->tm_mday, tm->tm_year + 1900); tm->tm_mon + 1, tm->tm_mday, tm->tm_year + 1900);
} }