mirror of
				https://github.com/troglobit/editline.git
				synced 2025-11-01 01:01:34 +08:00 
			
		
		
		
	Fix memory leak
This commit is contained in:
		| @@ -1392,12 +1392,13 @@ static int argify(char *line, char ***avp) | ||||
|     } | ||||
|     *c = '\0'; | ||||
|     p[ac] = NULL; | ||||
|  | ||||
|     return ac; | ||||
| } | ||||
|  | ||||
| static el_status_t last_argument(void) | ||||
| { | ||||
|     char      **av; | ||||
|     char      **av = NULL; | ||||
|     char       *p; | ||||
|     el_status_t s; | ||||
|     int         ac; | ||||
| @@ -1414,7 +1415,7 @@ static el_status_t last_argument(void) | ||||
|     else | ||||
|         s = ac ? insert_string(av[ac - 1]) : CSstay; | ||||
|  | ||||
|     if (ac) | ||||
|     if (av) | ||||
|         free(av); | ||||
|     free(p); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Joachim Nilsson
					Joachim Nilsson