svn commit: samba r14773 - in trunk/source/rpc_parse: .
jra at samba.org
jra at samba.org
Wed Mar 29 22:59:43 GMT 2006
Author: jra
Date: 2006-03-29 22:59:41 +0000 (Wed, 29 Mar 2006)
New Revision: 14773
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14773
Log:
Fix coverity bug #258. Seems coverity has discovered talloc :-).
Jeremy.
Modified:
trunk/source/rpc_parse/parse_shutdown.c
Changeset:
Modified: trunk/source/rpc_parse/parse_shutdown.c
===================================================================
--- trunk/source/rpc_parse/parse_shutdown.c 2006-03-29 22:59:33 UTC (rev 14772)
+++ trunk/source/rpc_parse/parse_shutdown.c 2006-03-29 22:59:41 UTC (rev 14773)
@@ -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