diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-04-09 16:04:16 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-04-11 04:11:19 -0700 |
commit | cafca5eaa068eaaa3e3a2ffab356efb4714c2968 (patch) | |
tree | 54653af8c91dadc2d7ebe1e766a715d575bd9c88 /gas/scfi.c | |
parent | 80ec23548f144e7bdfe2e7e9bcf78279c100d1ee (diff) | |
download | binutils-cafca5eaa068eaaa3e3a2ffab356efb4714c2968.zip binutils-cafca5eaa068eaaa3e3a2ffab356efb4714c2968.tar.gz binutils-cafca5eaa068eaaa3e3a2ffab356efb4714c2968.tar.bz2 |
gas: Fix a CFI label name memory leak in scfi.c
CFI label name can be freed only after use.
* scfi.c (handle_scfi_dot_cfi): Free CFI label name after use.
* scfidw2gen.c (scfi_process_cfi_label): Add a comment. Remove
TODO on freeing CFI label name.
Diffstat (limited to 'gas/scfi.c')
-rw-r--r-- | gas/scfi.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1141,6 +1141,7 @@ handle_scfi_dot_cfi (ginsnS *ginsn) break; case CFI_label: scfi_dot_cfi (CFI_label, 0, 0, 0, op->op_data->name, ginsn->sym); + free ((char *) op->op_data->name); break; case CFI_signal_frame: scfi_dot_cfi (CFI_signal_frame, 0, 0, 0, NULL, ginsn->sym); |