mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Fix newly reported coverity issues (Memory leak and flase positive of Use after Free).
This commit is contained in:
parent
5368877ebb
commit
5d46ffc3dc
6
exec.c
6
exec.c
@ -712,6 +712,7 @@ static int dobuf(struct buffer *bp)
|
||||
c = mdbugout( "<<<%s:%d:%s>>>", bp->b_bname, execlevel, eline) ;
|
||||
if( c == abortc) {
|
||||
freewhile( whlist) ;
|
||||
free( einit) ;
|
||||
return FALSE ;
|
||||
} else if( c == metac) {
|
||||
macbug = FALSE ;
|
||||
@ -733,6 +734,7 @@ static int dobuf(struct buffer *bp)
|
||||
if (dirnum == NUMDIRS) {
|
||||
mlwrite("%%Unknown Directive");
|
||||
freewhile(whlist);
|
||||
free( einit) ;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -752,8 +754,8 @@ static int dobuf(struct buffer *bp)
|
||||
/* allocate the space for the line */
|
||||
linlen = strlen(eline);
|
||||
if ((mp = lalloc(linlen)) == NULL) {
|
||||
mlwrite
|
||||
("Out of memory while storing macro");
|
||||
free( einit) ;
|
||||
mlwrite( "Out of memory while storing macro") ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user