summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gf.c2
-rw-r--r--src/gf_method.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/gf.c b/src/gf.c
index 2c232ec..10c9b3c 100644
--- a/src/gf.c
+++ b/src/gf.c
@@ -392,7 +392,7 @@ int gf_error_check(int w, int mult_type, int region_type, int divide_type,
if (mult_type == GF_MULT_COMPOSITE) {
if (w != 8 && w != 16 && w != 32
&& w != 64 && w != 128) { _gf_errno = GF_E_COMP__W; return 0; }
- if ((poly >> (w/2)) != 0) { _gf_errno = GF_E_COMP_PP; return 0; }
+ if (w < 128 && (poly >> (w/2)) != 0) { _gf_errno = GF_E_COMP_PP; return 0; }
if (divide_type != GF_DIVIDE_DEFAULT) { _gf_errno = GF_E_DIVCOMP; return 0; }
if (arg1 != 2) { _gf_errno = GF_E_COMP_A2; return 0; }
if (rsse || rnosse) { _gf_errno = GF_E_COMP_SS; return 0; }
diff --git a/src/gf_method.c b/src/gf_method.c
index 6fb869e..2548a63 100644
--- a/src/gf_method.c
+++ b/src/gf_method.c
@@ -107,7 +107,6 @@ int create_gf_from_argv(gf_t *gf, int w, int argc, char **argv, int starting)
return 0;
}
} else {
- if (base != NULL) gf_free(base, 1);
_gf_errno = GF_E_UNKNOWN;
return 0;
}