summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_samr.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-02 23:31:16 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-02 23:31:16 +0000
commitaa77f20a5b8fc83799e4befe668eb2da42727ac7 (patch)
tree02bf0cd57dacf26c5dbb36b7478e34bac2d84c1f /source3/rpc_client/cli_samr.c
parentdcc037cfc6d96e65048b5b5f975cca834a751016 (diff)
downloadsamba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.tar.gz
samba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.tar.bz2
samba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.zip
dynamic mem allocation in enum dom groups and enum dom aliases
(This used to be commit baa789fabc45e62889755802fd8ec8c9191fe767)
Diffstat (limited to 'source3/rpc_client/cli_samr.c')
-rw-r--r--source3/rpc_client/cli_samr.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 7c1860dee1..4ec658e664 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -665,6 +665,14 @@ uint32 samr_enum_dom_groups(struct cli_state *cli, uint16 fnum,
status = NT_STATUS_INVALID_PARAMETER | 0xC0000000;
}
+ if (r_e.sam != NULL)
+ {
+ free(r_e.sam);
+ }
+ if (r_e.uni_grp_name != NULL)
+ {
+ free(r_e.uni_grp_name);
+ }
}
prs_mem_free(&data );
@@ -753,6 +761,19 @@ uint32 samr_enum_dom_aliases(struct cli_state *cli, uint16 fnum,
}
(*start_idx) = r_e.next_idx;
}
+ else if (status == 0x0)
+ {
+ status = NT_STATUS_INVALID_PARAMETER | 0xC0000000;
+ }
+
+ if (r_e.sam != NULL)
+ {
+ free(r_e.sam);
+ }
+ if (r_e.uni_grp_name != NULL)
+ {
+ free(r_e.uni_grp_name);
+ }
}
prs_mem_free(&data );