summaryrefslogtreecommitdiff
path: root/source/winregd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-02-11 00:13:06 +0000
committerLuke Leighton <lkcl@samba.org>2000-02-11 00:13:06 +0000
commita087c07715bc0213d5ed9401c34903e47c0eb6e7 (patch)
treeec25151535d953821cd18e6ce7e5136bc8c2a628 /source/winregd
parent8098167b7ced2ae5939dc2a132e122d0a4ee3241 (diff)
downloadsamba-a087c07715bc0213d5ed9401c34903e47c0eb6e7.tar.gz
yes, it's a biggie. another semi-automated job, sed script by sander striker.
i had to use :map = /_io_^[bX$xA &&^[^M6ddcf( ^[ in vi to modify what you did, sander, to change this: if (!xxx_io_xxx(....)) { return False; } /* ..... */ if (rpc_con_pipe_req(...)) { .... into this: if (xxx_io_xxx(....) && rpc_con_pipe_req(...)) { .... because the return False; would have resulted in memory leaks.
Diffstat (limited to 'source/winregd')
-rw-r--r--source/winregd/srv_reg_nt.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/winregd/srv_reg_nt.c b/source/winregd/srv_reg_nt.c
index f6a421783a1..19733cd2ae8 100644
--- a/source/winregd/srv_reg_nt.c
+++ b/source/winregd/srv_reg_nt.c
@@ -182,13 +182,17 @@ static void reg_reply_open_entry(REG_Q_OPEN_ENTRY *q_u,
/*******************************************************************
api_reg_open_entry
********************************************************************/
-static void api_reg_open_entry( rpcsrv_struct *p, prs_struct *data,
+static BOOL api_reg_open_entry( rpcsrv_struct *p, prs_struct *data,
prs_struct *rdata )
{
REG_Q_OPEN_ENTRY q_u;
/* grab the reg open entry */
- reg_io_q_open_entry("", &q_u, data, 0);
+ if (!reg_io_q_open_entry("", &q_u, data, 0))
+ {
+ return False;
+ }
+
/* construct reply. */
reg_reply_open_entry(&q_u, rdata);
@@ -240,13 +244,17 @@ static void reg_reply_info(REG_Q_INFO *q_u,
/*******************************************************************
api_reg_info
********************************************************************/
-static void api_reg_info( rpcsrv_struct *p, prs_struct *data,
+static BOOL api_reg_info( rpcsrv_struct *p, prs_struct *data,
prs_struct *rdata )
{
REG_Q_INFO q_u;
/* grab the reg unknown 0x11*/
- reg_io_q_info("", &q_u, data, 0);
+ if (!reg_io_q_info("", &q_u, data, 0))
+ {
+ return False;
+ }
+
/* construct reply. always indicate success */
reg_reply_info(&q_u, rdata);
@@ -273,3 +281,4 @@ BOOL api_reg_rpc(rpcsrv_struct *p)
return api_rpcTNP(p, "api_reg_rpc", api_reg_cmds);
}
#endif
+