mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +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
|
uint64_t channels = c->channels; // need to preserve wide flag
|
||||||
int r = cell_load(n, c, egc);
|
int r = cell_load(n, c, egc);
|
||||||
c->channels = channels;
|
c->channels = channels;
|
||||||
if(r < 0){
|
free(egc);
|
||||||
free(egc);
|
|
||||||
}
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user