diff --git a/libyasm/floatnum.c b/libyasm/floatnum.c index 6461f341..e0a4fc32 100644 --- a/libyasm/floatnum.c +++ b/libyasm/floatnum.c @@ -475,6 +475,13 @@ floatnum_new(char *str) return flt; } +void +floatnum_delete(floatnum *flt) +{ + BitVector_Destroy(flt->mantissa); + free(flt); +} + int floatnum_get_int(unsigned long *ret_val, const floatnum *flt) { diff --git a/libyasm/floatnum.h b/libyasm/floatnum.h index e40099c4..d30cfa36 100644 --- a/libyasm/floatnum.h +++ b/libyasm/floatnum.h @@ -41,6 +41,7 @@ typedef struct floatnum_s { } floatnum; floatnum *floatnum_new(char *str); +void floatnum_delete(floatnum *flt); /* The get functions return nonzero if flt can't fit into that size format. */ diff --git a/src/floatnum.c b/src/floatnum.c index 6461f341..e0a4fc32 100644 --- a/src/floatnum.c +++ b/src/floatnum.c @@ -475,6 +475,13 @@ floatnum_new(char *str) return flt; } +void +floatnum_delete(floatnum *flt) +{ + BitVector_Destroy(flt->mantissa); + free(flt); +} + int floatnum_get_int(unsigned long *ret_val, const floatnum *flt) { diff --git a/src/floatnum.h b/src/floatnum.h index e40099c4..d30cfa36 100644 --- a/src/floatnum.h +++ b/src/floatnum.h @@ -41,6 +41,7 @@ typedef struct floatnum_s { } floatnum; floatnum *floatnum_new(char *str); +void floatnum_delete(floatnum *flt); /* The get functions return nonzero if flt can't fit into that size format. */