commit | dcae9cea97a1f45f413e92e3d8435c2a2a07b242 | [log] [tgz] |
---|---|---|
author | Lev Walkin <vlm@lionet.info> | Mon Sep 18 20:13:36 2017 -0700 |
committer | Lev Walkin <vlm@lionet.info> | Mon Sep 18 20:13:36 2017 -0700 |
tree | d080555949ccecfe962f9ce48db100285d58736c | |
parent | c8c286ab11a4c5362a949f17ff6cdfe4f453ea8a [diff] [blame] |
fixed leaks in CHOICE/XER and REAL conversion
diff --git a/skeletons/REAL.c b/skeletons/REAL.c index 82ef966..1247f09 100644 --- a/skeletons/REAL.c +++ b/skeletons/REAL.c
@@ -694,6 +694,7 @@ if(!st->buf || st->size < 2) { ptr = (uint8_t *)MALLOC(2); if(!ptr) return -1; + if(st->buf) FREEMEM(st->buf); st->buf = ptr; } /* fpclassify(3) is not portable yet */ @@ -717,6 +718,7 @@ } else { /* Negative zero. #8.5.3, 8.5.9 */ st->buf[0] = 0x43; + st->buf[1] = 0; st->size = 1; } }