svn commit: samba r14772 - in branches/SAMBA_3_0/source/rpc_parse: .
jra at samba.org
jra at samba.org
Wed Mar 29 22:59:34 GMT 2006
Author: jra
Date: 2006-03-29 22:59:33 +0000 (Wed, 29 Mar 2006)
New Revision: 14772
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14772
Log:
Fix coverity bug #258. Seems coverity has discovered talloc :-).
Jeremy.
Modified:
branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c 2006-03-29 22:56:12 UTC (rev 14771)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c 2006-03-29 22:59:33 UTC (rev 14772)
@@ -32,9 +32,18 @@
uint32 timeout, BOOL do_reboot, BOOL force)
{
q_s->server = TALLOC_P( get_talloc_ctx(), uint16 );
+ if (!q_s->server) {
+ smb_panic("init_shutdown_q_init: talloc fail.\n");
+ return;
+ }
+
*q_s->server = 0x1;
q_s->message = TALLOC_ZERO_P( get_talloc_ctx(), UNISTR4 );
+ if (!q_s->message) {
+ smb_panic("init_shutdown_q_init: talloc fail.\n");
+ return;
+ }
if ( msg && *msg ) {
init_unistr4( q_s->message, msg, UNI_FLAGS_NONE );
@@ -206,6 +215,11 @@
void init_shutdown_q_abort(SHUTDOWN_Q_ABORT *q_s)
{
q_s->server = TALLOC_P( get_talloc_ctx(), uint16 );
+ if (!q_s->server) {
+ smb_panic("init_shutdown_q_abort: talloc fail.\n");
+ return;
+ }
+
*q_s->server = 0x1;
}
More information about the samba-cvs
mailing list