mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed a memory leak in cString::operator=()
This commit is contained in:
		@@ -794,6 +794,7 @@ Sascha Volkenandt <sascha@akv-soft.de>
 | 
			
		||||
 for fixing a crash in cConfig::Load() when compiling on the PPC
 | 
			
		||||
 for reporting '\n' in an esyslog() call in osd.c
 | 
			
		||||
 for reporting missing '&' in the SetAreas() example in PLUGINS.html
 | 
			
		||||
 for reporting a memory leak in cString::operator=()
 | 
			
		||||
 | 
			
		||||
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
 | 
			
		||||
 for modifying LOF handling to allow for C-band reception
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							@@ -3922,3 +3922,4 @@ Video Disk Recorder Revision History
 | 
			
		||||
- Removed '\n' from several syslog() calls (reported by Sascha Volkenandt).
 | 
			
		||||
- Fixed missing '&' in the SetAreas() example in PLUGINS.html (reported by
 | 
			
		||||
  Sascha Volkenandt).
 | 
			
		||||
- Fixed a memory leak in cString::operator=() (reported by Sascha Volkenandt).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								tools.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tools.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: tools.c 1.101 2005/11/04 14:20:04 kls Exp $
 | 
			
		||||
 * $Id: tools.c 1.102 2005/11/04 14:26:39 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
@@ -534,6 +534,7 @@ cString::~cString()
 | 
			
		||||
 | 
			
		||||
cString &cString::operator=(const cString &String)
 | 
			
		||||
{
 | 
			
		||||
  free(s);
 | 
			
		||||
  s = String.s ? strdup(String.s) : NULL;
 | 
			
		||||
  return *this;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user