Skip to content

Commit

Permalink
Remove some unnecessary null checks before g_free
Browse files Browse the repository at this point in the history
  • Loading branch information
richardcohen committed Mar 15, 2023
1 parent b46d81e commit f38526c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gnucash/gnome-utils/gnc-main-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,8 @@ set_window_geometry(GncMainWindow *window, GncMainWindowSaveData *data, gchar *w
priv->pos[1] = pos[1];
DEBUG("window (%p) position (%d,%d)", window, pos[0], pos[1]);
}
if (geom)
{
g_free(geom);
}
if (pos)
{
g_free(pos);
}
g_free(geom);
g_free(pos);

gboolean max = g_key_file_get_boolean(data->key_file, window_group,
WINDOW_MAXIMIZED, &error);
Expand Down

0 comments on commit f38526c

Please sign in to comment.