Author: Armin Rigo <[email protected]>
Branch:
Changeset: r3182:1bba8ce1cb04
Date: 2019-01-08 10:00 +0100
http://bitbucket.org/cffi/cffi/changeset/1bba8ce1cb04/
Log: Oops, fix leak on errors
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -6848,7 +6848,7 @@
PyErr_Format(PyExc_ValueError,
"buffer is too small (%zd bytes) for '%s' (%zd bytes)",
view->len, ct->ct_name, ct->ct_size);
- goto error1;
+ goto error2;
}
arraylength = ct->ct_length;
}
@@ -6872,7 +6872,7 @@
PyErr_Format(PyExc_ZeroDivisionError,
"from_buffer('%s', ..): the actual length of the array "
"cannot be computed", ct->ct_name);
- goto error1;
+ goto error2;
}
}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit