mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Fix another memory leak or two (one real, one potential)
This commit is contained in:
		
							parent
							
								
									af8f974967
								
							
						
					
					
						commit
						6b34789046
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -1588,6 +1588,7 @@ ast_for_power(struct compiling *c, const node *n)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        tmp = BinOp(e, Pow, f, LINENO(n));
 | 
					        tmp = BinOp(e, Pow, f, LINENO(n));
 | 
				
			||||||
        if (!tmp) {
 | 
					        if (!tmp) {
 | 
				
			||||||
 | 
					            free_expr(f);
 | 
				
			||||||
            free_expr(e);
 | 
					            free_expr(e);
 | 
				
			||||||
            return NULL;
 | 
					            return NULL;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -2112,11 +2113,11 @@ ast_for_exprlist(struct compiling *c, const node *n, int context)
 | 
				
			||||||
	e = ast_for_expr(c, CHILD(n, i));
 | 
						e = ast_for_expr(c, CHILD(n, i));
 | 
				
			||||||
	if (!e)
 | 
						if (!e)
 | 
				
			||||||
	    goto error;
 | 
						    goto error;
 | 
				
			||||||
 | 
						asdl_seq_SET(seq, i / 2, e);
 | 
				
			||||||
	if (context) {
 | 
						if (context) {
 | 
				
			||||||
	    if (!set_context(e, context, CHILD(n, i)))
 | 
						    if (!set_context(e, context, CHILD(n, i)))
 | 
				
			||||||
	    	goto error;
 | 
						    	goto error;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
	asdl_seq_SET(seq, i / 2, e);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return seq;
 | 
					    return seq;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue