pulse: clear pa_simple pointer in pulse_close()
The pointer becomes invalid due to pa_simple_free(), which may lead to segmentation faults when the output is reopened later.
This commit is contained in:
		@@ -175,6 +175,7 @@ static void pulse_close(void *data)
 | 
				
			|||||||
	if (pd->s) {
 | 
						if (pd->s) {
 | 
				
			||||||
		pa_simple_drain(pd->s, NULL);
 | 
							pa_simple_drain(pd->s, NULL);
 | 
				
			||||||
		pa_simple_free(pd->s);
 | 
							pa_simple_free(pd->s);
 | 
				
			||||||
 | 
							pd->s = NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user