mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncplane_at_yx_cell(): plug memory leak on success path
This commit is contained in:
parent
1c7796a2b0
commit
dba42f9eef
@ -1155,9 +1155,7 @@ ncplane_at_yx_cell(struct ncplane* n, int y, int x, cell* c){
|
||||
uint64_t channels = c->channels; // need to preserve wide flag
|
||||
int r = cell_load(n, c, egc);
|
||||
c->channels = channels;
|
||||
if(r < 0){
|
||||
free(egc);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user