diff options
author | Ben Chan <benchan@chromium.org> | 2018-10-17 23:06:47 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-10-18 13:17:36 +0200 |
commit | 749b806c30b41512dec4901808976425cdf3e56b (patch) | |
tree | 78cb67b2b673866583e3b17617adcfac30dbbc57 /libmm-glib/mm-location-gps-raw.c | |
parent | 4156fd27186a517fcae938aaf23783000f6f34aa (diff) |
core: remove unnecessary NULL checks for g_free()
g_free() already check if the given pointer is NULL and does nothing on
a NULL pointer.
Diffstat (limited to 'libmm-glib/mm-location-gps-raw.c')
-rw-r--r-- | libmm-glib/mm-location-gps-raw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libmm-glib/mm-location-gps-raw.c b/libmm-glib/mm-location-gps-raw.c index 5241ba7c..4cfe7f08 100644 --- a/libmm-glib/mm-location-gps-raw.c +++ b/libmm-glib/mm-location-gps-raw.c @@ -217,8 +217,7 @@ mm_location_gps_raw_add_trace (MMLocationGpsRaw *self, if (g_regex_match (self->priv->gga_regex, trace, 0, &match_info)) { /* UTC time */ - if (self->priv->utc_time) - g_free (self->priv->utc_time); + g_free (self->priv->utc_time); self->priv->utc_time = g_match_info_fetch (match_info, 1); /* Latitude */ |