diff options
Diffstat (limited to 'src/mm-port-serial-gps.c')
-rw-r--r-- | src/mm-port-serial-gps.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mm-port-serial-gps.c b/src/mm-port-serial-gps.c index ea404994..fe8ec6a8 100644 --- a/src/mm-port-serial-gps.c +++ b/src/mm-port-serial-gps.c @@ -74,12 +74,12 @@ parse_response (MMPortSerial *port, GByteArray **parsed_response, GError **error) { - MMPortSerialGps *self = MM_PORT_SERIAL_GPS (port); - gboolean matches; - GMatchInfo *match_info; - gchar *str; - gint result_len; - guint i; + MMPortSerialGps *self = MM_PORT_SERIAL_GPS (port); + g_autoptr(GMatchInfo) match_info = NULL; + gboolean matches; + gchar *str; + gint result_len; + guint i; for (i = 0; i < response->len; i++) { /* If there is any content before the first $, @@ -110,8 +110,6 @@ parse_response (MMPortSerial *port, } } - g_match_info_free (match_info); - if (!matches) return MM_PORT_SERIAL_RESPONSE_NONE; |