You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cdef int init_c_vector_modint(c_vector_modint* v, int p, Py_ssize_t degree,
Py_ssize_t num_nonzero) except -1:
"""
Initialize a c_vector_modint.
"""
if (allocate_c_vector_modint(v, num_nonzero) == -1):
raise MemoryError, "Error allocating memory for sparse vector."
if p > 46340:
raise OverflowError, "The prime must be <= 46340."
v.num_nonzero = num_nonzero
v.degree = degree
v.p = p
return 0
On OverflowError v is leaked. Switching check and allocation will fix the problem.
Look at:
On OverflowError v is leaked. Switching check and allocation will fix the problem.
Cheers,
Michael
Component: memleak
Issue created by migration from https://trac.sagemath.org/ticket/4962
The text was updated successfully, but these errors were encountered: