diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 9 |
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); |