summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mp-binary.c2
-rw-r--r--src/parserfunc.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mp-binary.c b/src/mp-binary.c
index 8836776..d1de597 100644
--- a/src/mp-binary.c
+++ b/src/mp-binary.c
@@ -152,7 +152,7 @@ mp_not(const MPNumber *x, int wordlen, MPNumber *z)
if (!mp_is_positive_integer(x))
{
- /* Translators: Error displayed when boolean XOR attempted on non-integer values */
+ /* Translators: Error displayed when boolean NOT attempted on non-integer values */
mperr(_("Boolean NOT is only defined for positive integers"));
}
diff --git a/src/parserfunc.c b/src/parserfunc.c
index edd34f6..f35e6c5 100644
--- a/src/parserfunc.c
+++ b/src/parserfunc.c
@@ -866,7 +866,8 @@ pf_do_not(ParseNode* self)
{
set_error(self->state, PARSER_ERR_OVERFLOW, NULL);
free(ans);
- ans = NULL;
+ free(val);
+ return NULL;
}
mp_not(val, self->state->options->wordlen, ans);
free(val);