1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r14786: Fix coverity #275. null deref.

Jeremy.
This commit is contained in:
Jeremy Allison 2006-03-29 23:35:16 +00:00 committed by Gerald (Jerry) Carter
parent f88f2d9368
commit 363d31c9ec

View File

@ -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);