X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fgom.c;h=025541d5389ae0a8cef9437b30deb46bab6608ec;hb=e4ccfb6a6f26881db3874841a5aa2c2201a9c4e0;hp=a0aa9d68a152b24b58c30d9d392fd8ef368364e3;hpb=09b30ce415e2a2b126ea4d5ef899608d5b94e99b;p=gedcom-parse.git diff --git a/gom/gom.c b/gom/gom.c index a0aa9d6..025541d 100644 --- a/gom/gom.c +++ b/gom/gom.c @@ -145,6 +145,12 @@ void gom_unexpected_context(char* file, int line, OBJ_TYPE found) file, line, found); } +void gom_no_context(char* file, int line) +{ + gedcom_warning(_("Internal error: No context at %s, line %d"), + file, line); +} + void gom_default_callback (Gedcom_elt elt, Gedcom_ctxt parent, int level, char* tag, char* raw_value, int parsed_tag) { @@ -198,10 +204,8 @@ char* concat_strings(NL_TYPE type, char *str1, const char *str2) if (type == WITH_NL) len++; newp = (char*) realloc(str1, len); - if (newp == NULL) { - free (str1); + if (newp == NULL) return NULL; - } wp = newp + len1; str1 = newp; if (type == WITH_NL)