diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-28 19:56:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:08 -0500 |
commit | 4abb4797613868e518baafb5f3618e78f67ac05c (patch) | |
tree | ad67cecd99652512a1ed82107b6aac10bd2983f7 /source4/lib/registry | |
parent | dc6735457975ada838a03de7ca26efa0cf607f99 (diff) | |
download | samba-4abb4797613868e518baafb5f3618e78f67ac05c.tar.gz samba-4abb4797613868e518baafb5f3618e78f67ac05c.tar.bz2 samba-4abb4797613868e518baafb5f3618e78f67ac05c.zip |
r10588: Remove more unused files, macros
(This used to be commit d2f80c0457f7404b2cac9df59a400130e9ad025f)
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/tools/regpatch.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index 887f53df37..98e6c0ff5d 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -156,10 +156,13 @@ static void print_line(struct cmd_line *cl) */ static struct cmd_line *get_cmd_line(int fd) { - CMD_LINE *cl = smb_xmalloc_p(CMD_LINE); + CMD_LINE *cl = malloc_p(CMD_LINE); int i = 0, rc; uint8_t ch; + if (!cl) + return NULL; + cl->len = INIT_ALLOC; /* @@ -447,7 +450,9 @@ static CMD *regedit4_get_cmd(int fd) struct cmd_line *cl = NULL; struct val_spec_list *vl = NULL; - cmd = smb_xmalloc_p(struct command_s); + cmd = malloc_p(struct command_s); + if (!cmd) + return NULL; cmd->cmd = CMD_NONE; cmd->key = NULL; @@ -490,7 +495,9 @@ static CMD *regedit4_get_cmd(int fd) * There could be a \ on the end which we need to * handle at some time */ - vl = smb_xmalloc_p(struct val_spec_list); + vl = malloc_p(struct val_spec_list); + if (!vl) + return NULL; vl->next = NULL; vl->val = NULL; vl->name = parse_value(cl, &vl->type, &vl->val); @@ -609,7 +616,9 @@ static CMD_FILE *cmd_file_create(const char *file) return NULL; } - tmp = smb_xmalloc_p(CMD_FILE); + tmp = malloc_p(CMD_FILE); + if (!tmp) + return NULL; /* * Let's fill in some of the fields; |