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.
This commit is contained in:
committed by
Aleksander Morgado
parent
4156fd2718
commit
749b806c30
@@ -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 */
|
||||
|
||||
+2
-4
@@ -215,10 +215,8 @@ generate_3gpp_submit_pdus (MMBaseSms *self,
|
||||
}
|
||||
|
||||
/* Free array (not contents, which were taken for the part) */
|
||||
if (split_text)
|
||||
g_free (split_text);
|
||||
if (split_data)
|
||||
g_free (split_data);
|
||||
g_free (split_text);
|
||||
g_free (split_data);
|
||||
|
||||
/* Set additional multipart specific properties */
|
||||
if (n_parts > 1) {
|
||||
|
||||
@@ -1376,8 +1376,7 @@ detailed_disconnect_finish (MMBroadbandBearer *self,
|
||||
static void
|
||||
detailed_disconnect_context_free (DetailedDisconnectContext *ctx)
|
||||
{
|
||||
if (ctx->cgact_command)
|
||||
g_free (ctx->cgact_command);
|
||||
g_free (ctx->cgact_command);
|
||||
g_object_unref (ctx->data);
|
||||
g_object_unref (ctx->primary);
|
||||
if (ctx->secondary)
|
||||
|
||||
Reference in New Issue
Block a user