From 0fb888a9407a0276a58348d6aadbb2a54ccd1d4d Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 16 Mar 2014 09:52:18 +0100 Subject: [PATCH] Make gswe_planet_info_free() free its name only if it is set --- src/gswe-planet-info.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gswe-planet-info.c b/src/gswe-planet-info.c index 368f8a5..4916816 100644 --- a/src/gswe-planet-info.c +++ b/src/gswe-planet-info.c @@ -69,7 +69,10 @@ gswe_planet_info_ref(GswePlanetInfo *planet_info) static void gswe_planet_info_free(GswePlanetInfo *planet_info) { - g_free(planet_info->name); + if (planet_info->name) { + g_free(planet_info->name); + } + g_free(planet_info); }