mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
fix memory leak in system DSL function
This commit is contained in:
parent
c1e867e234
commit
8aeecabe7a
2 changed files with 6 additions and 1 deletions
|
|
@ -455,7 +455,7 @@ mv_t s_s_capitalize_func(mv_t* pval1) {
|
|||
}
|
||||
|
||||
mv_t s_s_system_func(mv_t* pval1) {
|
||||
char* cmd = mlr_strdup_or_die(pval1->u.strv);
|
||||
char* cmd = pval1->u.strv;
|
||||
|
||||
mv_t retval = mv_from_string_no_free("error-running-system-command");
|
||||
string_builder_t* psb = sb_alloc(100);
|
||||
|
|
@ -478,6 +478,7 @@ mv_t s_s_system_func(mv_t* pval1) {
|
|||
|
||||
retval = mv_from_string_with_free(output_string);
|
||||
}
|
||||
sb_free(psb);
|
||||
|
||||
mv_free(pval1);
|
||||
pval1->u.strv = NULL;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ TOP OF LIST
|
|||
quick doc:
|
||||
* multi-join @ FAQ
|
||||
* doc/bld note for vgrun oo
|
||||
- git log; find last release
|
||||
- git diff -r xxxxx reg_test/run
|
||||
- export indir=./reg_test/input
|
||||
- vgrun mlr ...
|
||||
|
||||
* sort-within-records
|
||||
* system()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue