on xenial help sign in
Don't need null checks for g_free
e95f44cMichael Terry
tests/plugins/Unity/Session/preload.c+2−4
@@ -29,10 +29,8 @@ struct group *getgrnam(const char *group_name)
29{
29{
30 static struct group rv = {NULL, NULL, 0, NULL};
30 static struct group rv = {NULL, NULL, 0, NULL};
31
31
32− if (rv.gr_name) {
33− g_free(rv.gr_name);
32+ g_free(rv.gr_name);
34− g_strfreev(rv.gr_mem);
33+ g_strfreev(rv.gr_mem);
35− }
36
34
37 rv.gr_name = g_strdup(group_name);
35 rv.gr_name = g_strdup(group_name);
38 rv.gr_passwd = NULL;
36 rv.gr_passwd = NULL;