From ff459aa292c80d9ad1c42ffa2c60d22ffc065579 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Fri, 28 Apr 2000 01:25:50 +0000 Subject: fix memory leak (save_to_vcal): same (save): same (cal_backend_load): same * pcs/cal-backend.c (cal_backend_load): fix memory leak (save_to_vcal): same (save): same (cal_backend_load): same svn path=/trunk/; revision=2668 --- calendar/pcs/cal-backend.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'calendar') diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 364a4670c6..8864206cd2 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -190,6 +190,7 @@ save_to_vcal (CalBackend *backend, char *fname) writeVObject(fp, vcal); fclose(fp); } + cleanVObject (vcal); cleanStrTbl (); } @@ -224,6 +225,8 @@ save (CalBackend *backend) break; } + g_free (str_uri); + printf ("cal-backend: '%s' saved\n", str_uri); } @@ -755,6 +758,7 @@ cal_backend_load (CalBackend *backend, GnomeVFSURI *uri) vobject = Parse_MIME_FromFileName (str_uri); if (!vobject){ + g_free (str_uri); return CAL_BACKEND_LOAD_ERROR; } @@ -766,6 +770,7 @@ cal_backend_load (CalBackend *backend, GnomeVFSURI *uri) icalendar_calendar_load (backend, str_uri); break; default: + g_free (str_uri); return CAL_BACKEND_LOAD_ERROR; } -- cgit