fix memoryleak
This commit is contained in:
		
							parent
							
								
									f335ff2927
								
							
						
					
					
						commit
						bab419f56f
					
				
							
								
								
									
										8
									
								
								dunst.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								dunst.c
									
									
									
									
									
								
							| @ -447,17 +447,17 @@ void draw_win(void) | ||||
|         /* resize window and draw background */ | ||||
|         if (width == 0) { | ||||
|                 printf("Warning: width == 0\n"); | ||||
|                 return; | ||||
|                 goto draw_win_cleanup; | ||||
|         } | ||||
| 
 | ||||
|         if (height == 0) { | ||||
|                 printf("Warning: height == 0\n"); | ||||
|                 return; | ||||
|                 goto draw_win_cleanup; | ||||
|         } | ||||
| 
 | ||||
|         if (font_h == 0) { | ||||
|                 printf("Warning: font_h == 0\n"); | ||||
|                 return; | ||||
|                 goto draw_win_cleanup; | ||||
|         } | ||||
|         resizedc(dc, width, height * font_h); | ||||
|         XResizeWindow(dc->dpy, win, width, height * font_h); | ||||
| @ -480,6 +480,8 @@ void draw_win(void) | ||||
|         XMoveWindow(dc->dpy, win, x, y); | ||||
|         mapdc(dc, win, width, height * font_h); | ||||
| 
 | ||||
| 
 | ||||
| draw_win_cleanup: | ||||
|         /* cleanup */ | ||||
|         free(n_buf); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse