diff options
author | Michael Adam <obnox@samba.org> | 2008-04-23 01:48:26 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-23 01:48:26 +0200 |
commit | 21e82d7afcae995e1c38c020945f59a3561099fd (patch) | |
tree | 052a1cedf7de62dea8dc0614403e41820b6295fe /source3 | |
parent | 8cf78fd594ab20a03315a4a04941d37a682d22cf (diff) | |
download | samba-21e82d7afcae995e1c38c020945f59a3561099fd.tar.gz samba-21e82d7afcae995e1c38c020945f59a3561099fd.tar.bz2 samba-21e82d7afcae995e1c38c020945f59a3561099fd.zip |
libsmbconf: remove unnecessary talloc success checks from smbconf_reg.c
talloc_stackframe panics on NOMEM.
Michael
(This used to be commit 03fd30eef803ff2718e7af618d38944d56ccd329)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index 5f5724c406..b6d6d70621 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -195,10 +195,7 @@ static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx, /* create a new talloc ctx for creation. it will hold * the intermediate parent key (SMBCONF) for creation * and will be destroyed when leaving this function... */ - if (!(create_ctx = talloc_stackframe())) { - werr = WERR_NOMEM; - goto done; - } + create_ctx = talloc_stackframe(); werr = smbconf_reg_open_base_key(create_ctx, ctx, REG_KEY_WRITE, &create_parent); @@ -471,10 +468,6 @@ static WERROR smbconf_reg_get_values(TALLOC_CTX *mem_ctx, } tmp_ctx = talloc_stackframe(); - if (tmp_ctx == NULL) { - werr = WERR_NOMEM; - goto done; - } for (count = 0; werr = reg_enumvalue(tmp_ctx, key, count, &valname, &valvalue), @@ -760,10 +753,6 @@ static WERROR smbconf_reg_get_share_names(struct smbconf_ctx *ctx, } tmp_ctx = talloc_stackframe(); - if (tmp_ctx == NULL) { - werr = WERR_NOMEM; - goto done; - } /* if there are values in the base key, return NULL as share name */ werr = smbconf_reg_open_base_key(tmp_ctx, ctx, |