summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/asn1/asn1parse.y
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-08-15 18:31:28 +0400
committerAndrew Bartlett <abartlet@samba.org>2010-10-03 01:15:04 +0000
commitab6e3fce040f9ad27cbce44e9038a24f15b601c8 (patch)
treeab99a431c9610927b5d0d26335d2712b509fd6dc /source4/heimdal/lib/asn1/asn1parse.y
parent197a1514d62494cc8b862d169c841a26e04b8925 (diff)
downloadsamba-ab6e3fce040f9ad27cbce44e9038a24f15b601c8.tar.gz
samba-ab6e3fce040f9ad27cbce44e9038a24f15b601c8.tar.bz2
samba-ab6e3fce040f9ad27cbce44e9038a24f15b601c8.zip
s4:heimdal: import lorikeet-heimdal-201009250123 (commit 42cabfb5b683dbcb97d583c397b897507689e382)
I based this on Matthieu's import of lorikeet-heimdal, and then updated it to this commit. Andrew Bartlett
Diffstat (limited to 'source4/heimdal/lib/asn1/asn1parse.y')
-rw-r--r--source4/heimdal/lib/asn1/asn1parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/heimdal/lib/asn1/asn1parse.y b/source4/heimdal/lib/asn1/asn1parse.y
index 13b86b17c1..611c5b521a 100644
--- a/source4/heimdal/lib/asn1/asn1parse.y
+++ b/source4/heimdal/lib/asn1/asn1parse.y
@@ -1007,7 +1007,8 @@ static void fix_labels1(struct memhead *members, const char *prefix)
if(members == NULL)
return;
ASN1_TAILQ_FOREACH(m, members, members) {
- asprintf(&m->label, "%s_%s", prefix, m->gen_name);
+ if (asprintf(&m->label, "%s_%s", prefix, m->gen_name) < 0)
+ errx(1, "malloc");
if (m->label == NULL)
errx(1, "malloc");
if(m->type != NULL)
@@ -1024,9 +1025,8 @@ static void fix_labels2(Type *t, const char *prefix)
static void
fix_labels(Symbol *s)
{
- char *p;
- asprintf(&p, "choice_%s", s->gen_name);
- if (p == NULL)
+ char *p = NULL;
+ if (asprintf(&p, "choice_%s", s->gen_name) < 0 || p == NULL)
errx(1, "malloc");
fix_labels2(s->type, p);
free(p);