Commit Diff
Diff:
0e4d931b69426dadd7f2691656b567e858777a85
3edf28efe3da8b0628ba68cfaf2f5f437e2f290b
Commit:
3edf28efe3da8b0628ba68cfaf2f5f437e2f290b
Tree:
61183fd368db0ebf03c165850f9787bd5bd4085d
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Sun May 11 15:58:29 2014 UTC
Message:
* yes do free malloc'ed data.
blob - 7b5ae94b915c0eb8cea96630797e4868bb3632ca
blob + d03b32fd02b11e17276457af7a6c672a3d25384d
--- parse.y
+++ parse.y
@@ -58,7 +58,7 @@ typedef struct {
int lineno;
} YYSTYPE;
-static const char rcsid[] = "$Id: parse.y,v 1.18 2014/05/11 15:39:50 pjp Exp $";
+static const char rcsid[] = "$Id: parse.y,v 1.19 2014/05/11 15:58:29 pjp Exp $";
static int version = 0;
static int state = 0;
static uint8_t region = 0;
@@ -1736,7 +1736,7 @@ fill_naptr(char *name, char *type, int myttl, int orde
sdomain.naptr[sdomain.naptr_count].regexplen = regexplen;
naptrname = check_rr(replacement, type, DNS_TYPE_NAPTR, &naptr_namelen);
- if (converted_name == NULL) {
+ if (naptrname == NULL) {
return -1;
}
@@ -1749,6 +1749,9 @@ fill_naptr(char *name, char *type, int myttl, int orde
set_record(&sdomain, converted_name, converted_namelen);
+ if (naptrname)
+ free (naptrname);
+
if (converted_name)
free (converted_name);
repomaster@centroid.eu