mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-21 02:23:20 +00:00
valgrind findings
This commit is contained in:
parent
31e334b32f
commit
d2ce1d6568
2 changed files with 6 additions and 3 deletions
|
|
@ -195,7 +195,10 @@ boxed_xval_t m_ss_splitnvx_xfunc(boxed_xval_t* pstringval, boxed_xval_t* psepval
|
|||
char* piece;
|
||||
while ((piece = strsep(&walker, sep)) != NULL) {
|
||||
mv_t key = mv_from_int(i);
|
||||
// xxx do not ref here
|
||||
mv_t val = mv_ref_type_infer_string(piece);
|
||||
// xxx make clear the copy/ref semantics for mlhmmv put with scalar value.
|
||||
// at the moment this does an mv_copy.
|
||||
mlhmmv_level_put_terminal_singly_keyed(map.pnext_level, &key, &val);
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -971,8 +971,8 @@ mv_t get_srec_value_string_only(char* field_name, lrec_t* pinrec, lhmsmv_t* ptyp
|
|||
// freed out from underneath it by the evaluator functions.
|
||||
rv = mv_copy(poverlay);
|
||||
} else {
|
||||
// No strdup: string value points into lrec memory and is valid as long as the lrec is.
|
||||
rv = mv_ref_type_infer_string(lrec_get(pinrec, field_name));
|
||||
rv = mv_copy(&rv);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -988,8 +988,8 @@ mv_t get_srec_value_string_float(char* field_name, lrec_t* pinrec, lhmsmv_t* pty
|
|||
// freed out from underneath it by the evaluator functions.
|
||||
rv = mv_copy(poverlay);
|
||||
} else {
|
||||
// No strdup: string value points into lrec memory and is valid as long as the lrec is.
|
||||
rv = mv_ref_type_infer_string_or_float(lrec_get(pinrec, field_name));
|
||||
rv = mv_copy(&rv);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -1005,8 +1005,8 @@ mv_t get_srec_value_string_float_int(char* field_name, lrec_t* pinrec, lhmsmv_t*
|
|||
// freed out from underneath it by the evaluator functions.
|
||||
rv = mv_copy(poverlay);
|
||||
} else {
|
||||
// No strdup: string value points into lrec memory and is valid as long as the lrec is.
|
||||
rv = mv_ref_type_infer_string_or_float_or_int(lrec_get(pinrec, field_name));
|
||||
rv = mv_copy(&rv);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue