Ensure dsa->g is initialized with other mp_ints so that it can be cleared at the end regardless of failures. Don't clear tmp or tmp2 if allocation or initialization failed as you will access uninitialized data.
Ensure dsa->g is initialized with other mp_ints so that it can be cleared at the end regardless of failures. Don't clear tmp or tmp2 if allocation or initialization failed as you will access uninitialized data.