[PATCH 2/3] Free trip notes memory when deleting a trip

Lubomir I. Ivanov neolit123 at gmail.com
Fri Dec 28 05:43:03 PST 2012


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 divelist.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/divelist.c b/divelist.c
index bd610ac..bb94033 100644
--- a/divelist.c
+++ b/divelist.c
@@ -1083,6 +1083,8 @@ static void delete_trip(dive_trip_t *trip)
 	/* .. and free it */
 	if (trip->location)
 		free(trip->location);
+	if (trip->notes)
+		free(trip->notes);
 	free(trip);
 }
 
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list