mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
egcpool_stash: exit on strdup() failure #624
This commit is contained in:
parent
96a47de845
commit
e32e4d9744
@ -127,7 +127,9 @@ egcpool_stash(egcpool* pool, const char* egc, size_t ulen){
|
|||||||
do{
|
do{
|
||||||
if(egcpool_alloc_justified(pool, len) || searched){
|
if(egcpool_alloc_justified(pool, len) || searched){
|
||||||
if(!duplicated){
|
if(!duplicated){
|
||||||
duplicated = strdup(egc);
|
if((duplicated = strdup(egc)) == NULL){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(egcpool_grow(pool, len) && searched){
|
if(egcpool_grow(pool, len) && searched){
|
||||||
free(duplicated);
|
free(duplicated);
|
||||||
|
Loading…
Reference in New Issue
Block a user