mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Memory leak in error path and unnecessary assignment, from clang.
This commit is contained in:
		| @@ -142,7 +142,6 @@ do_print: | |||||||
| 		return (CMD_RETURN_ERROR); | 		return (CMD_RETURN_ERROR); | ||||||
| 	} | 	} | ||||||
| 	msg = NULL; | 	msg = NULL; | ||||||
| 	msglen = 0; |  | ||||||
|  |  | ||||||
| 	used = 0; | 	used = 0; | ||||||
| 	while (used != pb->size) { | 	while (used != pb->size) { | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								grid.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								grid.c
									
									
									
									
									
								
							| @@ -624,7 +624,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx, | |||||||
| 		off += size; | 		off += size; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|         if (trim) { | 	if (trim) { | ||||||
| 		while (off > 0 && buf[off - 1] == ' ') | 		while (off > 0 && buf[off - 1] == ' ') | ||||||
| 			off--; | 			off--; | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -96,7 +96,7 @@ get_proc_name(int fd, char *tty) | |||||||
|  |  | ||||||
| retry: | retry: | ||||||
| 	if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1) | 	if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1) | ||||||
| 		return (NULL); | 		goto error; | ||||||
| 	len = (len * 5) / 4; | 	len = (len * 5) / 4; | ||||||
|  |  | ||||||
| 	if ((newbuf = realloc(buf, len)) == NULL) | 	if ((newbuf = realloc(buf, len)) == NULL) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm