POLY: free the array pointer as well

This commit is contained in:
hasufell 2014-05-25 19:54:03 +02:00
parent 4d8b6a78e5
commit 30b917b3be
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -121,7 +121,9 @@ void poly_delete(fmpz_poly_t poly)
/**
* Delete the internal structure of a polynomial
* array which must be NULL terminated.
* array which must be NULL terminated. It is expected
* that poly_array is not on the stack and was obtained
* by a function like ascii_to_poly().
*
* @param poly_array the polynomial array
*/
@ -134,6 +136,7 @@ void poly_delete_array(fmpz_poly_t **poly_array)
free(*(poly_array[i]));
i++;
}
free(poly_array);
}
/**