summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-29 23:35:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:48 -0500
commit00fb5e431d9e418597cadcc7914818f8cf1cc102 (patch)
treebc4a62205fb4d77ab4f4d81fddb4a796753c3544
parentec4191fe985a6095bffde3c137e9fd3ceac24d76 (diff)
downloadsamba-00fb5e431d9e418597cadcc7914818f8cf1cc102.tar.gz
samba-00fb5e431d9e418597cadcc7914818f8cf1cc102.tar.bz2
samba-00fb5e431d9e418597cadcc7914818f8cf1cc102.zip
r14786: Fix coverity #275. null deref.
Jeremy. (This used to be commit 363d31c9ec2d2a4429ab4d26b3d7c78b76f60626)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 350e9d3562..44a0aeba90 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -723,14 +723,21 @@ static void notify_system_time(struct spoolss_notify_msg *msg,
if (!make_systemtime(&systime, gmtime((time_t *)msg->notify.data))) {
DEBUG(5, ("notify_system_time: unable to make systemtime\n"));
+ prs_mem_free(&ps);
return;
}
- if (!spoolss_io_system_time("", &ps, 0, &systime))
+ if (!spoolss_io_system_time("", &ps, 0, &systime)) {
+ prs_mem_free(&ps);
return;
+ }
data->notify_data.data.length = prs_offset(&ps);
data->notify_data.data.string = TALLOC(mem_ctx, prs_offset(&ps));
+ if (!data->notify_data.data.string) {
+ prs_mem_free(&ps);
+ return;
+ }
prs_copy_all_data_out((char *)data->notify_data.data.string, &ps);