mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Fix more memory leaks, improve zfree() action
This commit is contained in:
2
zmath.h
2
zmath.h
@@ -579,7 +579,7 @@ E_FUNC void zredcpower(REDC *rp, ZVALUE z1, ZVALUE z2, ZVALUE *res);
|
||||
#define zcopyval(z1,z2) memcpy((z2).v, (z1).v, (z1).len * sizeof(HALF))
|
||||
#define zquicktrim(z) {if (((z).len > 1) && ((z).v[(z).len-1] == 0)) \
|
||||
(z).len--;}
|
||||
#define zfree(z) freeh((z).v)
|
||||
#define zfree(z) {if ((z).len != 0 && (z).v != NULL) { freeh((z).v); (z).len = 0; (z).v = NULL; (z).sign = 0; } }
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user