Skip to content
Myr

Fix input_(line_number|filename) leak memory

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Clément MATHIEU · committed by Nico Williams · parent e5c30e6 · Browse files · 1 file+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:src/builtin.c+5 added-2 removed
1225 unmodified lines
1226 return jv_number(time(NULL));1227}1228#endif12291230static jv f_current_filename(jq_state *jq) {1230static jv f_current_filename(jq_state *jq, jv a) {1231 jv_free(a);12321233 jv r = jq_util_input_get_current_filename(jq);1234 if (jv_is_valid(r))1235 return r;1236 jv_free(r);1237 return jv_null();1238}1237static jv f_current_line(jq_state *jq) {1239static jv f_current_line(jq_state *jq, jv a) {1240 jv_free(a);1241 return jq_util_input_get_current_line(jq);1242}12431244#define LIBM_DD(name) \
181 unmodified lines