# HG changeset patch
# User rosfran
# Date 1165245005 0
# Node ID 58bc1bd585e30134fd69a8220e5972e4f0fe3051
# Parent  f61807a4a51c96e289879c218ddd2529466ec901
[svn r184] Fixes the mktime bug, when allocating a  struct tm varialble.

diff -r f61807a4a51c -r 58bc1bd585e3 gmyth/src/gmyth_util.c
--- a/gmyth/src/gmyth_util.c	Mon Dec 04 14:01:20 2006 +0000
+++ b/gmyth/src/gmyth_util.c	Mon Dec 04 15:10:05 2006 +0000
@@ -103,15 +103,15 @@
 		g_warning ("GMythUtil: isoformat_to_time converter error!\n");
 		return 0;
 	} else {
-		struct tm tm_time;
-		tm_time.tm_year = year - 1900;
-		tm_time.tm_mon = month - 1;
-		tm_time.tm_mday = day;
-		tm_time.tm_hour = hour;
-		tm_time.tm_min = min;
-		tm_time.tm_sec = sec;
+		struct tm* tm_time = g_new0( struct tm, 1 );
+		tm_time->tm_year = year - 1900;
+		tm_time->tm_mon = month - 1;
+		tm_time->tm_mday = day;
+		tm_time->tm_hour = hour;
+		tm_time->tm_min = min;
+		tm_time->tm_sec = sec;
 		
-		return mktime (&tm_time);
+		return mktime (tm_time);
 	}
 }