mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Fix tiny memleak in panels reported by coverity
This commit is contained in:
parent
36f056d67b
commit
8afa433190
@ -2327,6 +2327,7 @@ static int ds_print_meta_infos(RDisasmState *ds, ut8* buf, int len, int idx) {
|
||||
break;
|
||||
case 0: /* temporary legacy workaround */
|
||||
esc_bslash = false;
|
||||
/* fallthrough */
|
||||
default:
|
||||
out = r_str_escape_latin1 (mi->str, false, esc_bslash);
|
||||
}
|
||||
|
@ -159,7 +159,11 @@ static void Panel_print(RConsCanvas *can, Panel *n, int cur) {
|
||||
white[idx] = 0;
|
||||
text = r_str_ansi_crop (foo,
|
||||
0, delta_y, n->w + delta_x - 2, n->h - 2 + delta_y);
|
||||
text = r_str_prefix_all (text, white);
|
||||
char *newText = r_str_prefix_all (text, white);
|
||||
if (newText) {
|
||||
free (text);
|
||||
text = newText;
|
||||
}
|
||||
} else {
|
||||
text = r_str_ansi_crop (foo,
|
||||
delta_x, delta_y, n->w + delta_x - 2, n->h - 2 + delta_y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user