libipf: fix parser error message.

MFC after:	1 week
Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D41652
This commit is contained in:
Dag-Erling Smørgrav 2023-08-31 22:15:54 +02:00
parent 09ec5e67a7
commit 4cd9d804ae
1 changed files with 1 additions and 5 deletions

View File

@ -93,11 +93,7 @@ parseipfexpr(char *line, char **errorptr)
break;
}
if (e->ipoe_word == NULL) {
error = malloc(32);
if (error != NULL) {
snprintf(error, sizeof(error), "keyword (%.10s) not found",
ops);
}
asprintf(&error, "keyword (%.10s) not found", ops);
goto parseerror;
}