diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-14 20:33:32 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-14 20:33:32 +0200 |
commit | 63a31bee666a9bf9e37eda447f7742b07917dc74 (patch) | |
tree | 8b09ec6ebcd88a8dc760d327faca118a251fa8b3 /mpfr.c | |
parent | 5ba504111dee165e033b3a9087c13ffca2b30302 (diff) | |
download | egawk-63a31bee666a9bf9e37eda447f7742b07917dc74.tar.gz egawk-63a31bee666a9bf9e37eda447f7742b07917dc74.tar.bz2 egawk-63a31bee666a9bf9e37eda447f7742b07917dc74.zip |
Fix small potential memory leak for intdiv.
Diffstat (limited to 'mpfr.c')
-rw-r--r-- | mpfr.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2015, 2017, 2018, + * Copyright (C) 2012, 2013, 2015, 2017, 2018, 2019, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -1265,11 +1265,13 @@ do_mpfr_intdiv(int nargs) lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = quotient; + unref(sub); sub = make_string("remainder", 9); lhs = assoc_lookup(result, sub); unref(*lhs); *lhs = remainder; + unref(sub); return make_number((AWKNUM) 0.0); } |