- Cannot reproduce https://github.com/clicon/clixon/issues/245, added sanity chaeck and regression test

This commit is contained in:
Olof hagsand 2021-09-09 14:01:48 +02:00
parent ca14879e8c
commit 3cd3f7987d
2 changed files with 11 additions and 0 deletions

View file

@ -708,6 +708,10 @@ xp_relop(xp_ctx *xc1,
int reverse = 0;
double n1, n2;
if (xc1 == NULL || xc2 == NULL){
clicon_err(OE_UNIX, EINVAL, "xc1 or xc2 NULL");
goto done;
}
if ((xr = malloc(sizeof(*xr))) == NULL){
clicon_err(OE_UNIX, errno, "malloc");
goto done;